bb-tournament-api
Advanced tools
Comparing version 3.0.0 to 3.0.1
{ | ||
"name": "bb-tournament-api", | ||
"version": "3.0.0", | ||
"version": "3.0.1", | ||
"description": "API schema for BridgeBuddy tournament server", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -27,11 +27,17 @@ { | ||
"type": "object", | ||
"description": "The query parameters of the request" | ||
"description": "The query parameters of the request", | ||
"properties": {}, | ||
"additionalProperties": true | ||
}, | ||
"body": { | ||
"type": "object", | ||
"description": "The literal request body" | ||
"description": "The literal request body", | ||
"properties": {}, | ||
"additionalProperties": true | ||
} | ||
} | ||
}, | ||
"required": ["query", "body"] | ||
} | ||
} | ||
}, | ||
"required": ["operationId", "datetime", "admin", "request"] | ||
} |
163
types.js
@@ -93,7 +93,7 @@ // To parse this data: | ||
function toIntervention(json) { | ||
return cast(JSON.parse(json), r("Tables")); | ||
return cast(JSON.parse(json), r("Intervention")); | ||
} | ||
function interventionToJson(value) { | ||
return JSON.stringify(uncast(value, r("Tables")), null, 2); | ||
return JSON.stringify(uncast(value, r("Intervention")), null, 2); | ||
} | ||
@@ -370,3 +370,3 @@ | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("BoardMongodbProperties") }, | ||
@@ -395,3 +395,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("PurpleProperties") }, | ||
@@ -407,3 +407,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("SuitType") }, | ||
{ json: "type", js: "type", typ: r("Type") }, | ||
{ json: "enum", js: "enum", typ: a(r("Enum")) }, | ||
@@ -413,3 +413,3 @@ { json: "$schema", js: "$schema", typ: u(undefined, "") }, | ||
"Value": o([ | ||
{ json: "type", js: "type", typ: r("SuitType") }, | ||
{ json: "type", js: "type", typ: r("Type") }, | ||
{ json: "enum", js: "enum", typ: a("") }, | ||
@@ -425,3 +425,3 @@ ], false), | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("BoardResultsProperties") }, | ||
@@ -435,7 +435,7 @@ { json: "required", js: "required", typ: a("") }, | ||
"OtherResults": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("OwnResult") }, | ||
], false), | ||
"OwnResult": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("OwnResultProperties") }, | ||
@@ -456,9 +456,9 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "items", js: "items", typ: u(undefined, r("PurpleItems")) }, | ||
{ json: "properties", js: "properties", typ: u(undefined, r("TentacledProperties")) }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: u(undefined, r("BoardsItems")) }, | ||
{ json: "properties", js: "properties", typ: u(undefined, r("BoardsProperties")) }, | ||
], false), | ||
"PurpleItems": o([ | ||
"BoardsItems": o([ | ||
{ json: "$ref", js: "$ref", typ: u(undefined, "") }, | ||
{ json: "type", js: "type", typ: u(undefined, r("PurpleType")) }, | ||
{ json: "type", js: "type", typ: u(undefined, "") }, | ||
{ json: "properties", js: "properties", typ: u(undefined, r("FluffyProperties")) }, | ||
@@ -476,31 +476,11 @@ { json: "required", js: "required", typ: u(undefined, a("")) }, | ||
], false), | ||
"TentacledProperties": o([ | ||
{ json: "operationid", js: "operationid", typ: u(undefined, r("Operationid")) }, | ||
{ json: "datetime", js: "datetime", typ: u(undefined, r("Datetime")) }, | ||
{ json: "admin", js: "admin", typ: u(undefined, r("Admin")) }, | ||
{ json: "request", js: "request", typ: u(undefined, r("Request")) }, | ||
"BoardsProperties": o([ | ||
{ json: "points", js: "points", typ: u(undefined, r("Percent")) }, | ||
{ json: "percent", js: "percent", typ: u(undefined, r("Percent")) }, | ||
{ json: "reason", js: "reason", typ: u(undefined, r("Operationid")) }, | ||
{ json: "reason", js: "reason", typ: u(undefined, r("Reason")) }, | ||
{ json: "number", js: "number", typ: u(undefined, r("BoardNr")) }, | ||
{ json: "players", js: "players", typ: u(undefined, r("Players")) }, | ||
], false), | ||
"Admin": o([ | ||
{ json: "oneOf", js: "oneOf", typ: a(r("AdminOneOf")) }, | ||
], false), | ||
"AdminOneOf": o([ | ||
{ json: "type", js: "type", typ: r("SuitType") }, | ||
{ json: "format", js: "format", typ: "" }, | ||
], false), | ||
"Datetime": o([ | ||
{ json: "type", js: "type", typ: r("SuitType") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "format", js: "format", typ: "" }, | ||
], false), | ||
"Operationid": o([ | ||
"Players": o([ | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "description", js: "description", typ: u(undefined, "") }, | ||
], false), | ||
"Players": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "items", js: "items", typ: r("SuitClass") }, | ||
@@ -511,10 +491,6 @@ { json: "minItems", js: "minItems", typ: 0 }, | ||
], false), | ||
"Request": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "properties", js: "properties", typ: r("RequestProperties") }, | ||
"Reason": o([ | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "description", js: "description", typ: u(undefined, "") }, | ||
], false), | ||
"RequestProperties": o([ | ||
{ json: "query", js: "query", typ: r("Operationid") }, | ||
{ json: "body", js: "body", typ: r("Operationid") }, | ||
], false), | ||
"Card": o([ | ||
@@ -524,3 +500,3 @@ { json: "$schema", js: "$schema", typ: "" }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("CardProperties") }, | ||
@@ -537,3 +513,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("ContractProperties") }, | ||
@@ -556,3 +532,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("DealProperties") }, | ||
@@ -574,2 +550,45 @@ { json: "required", js: "required", typ: a("") }, | ||
], false), | ||
"Intervention": o([ | ||
{ json: "$schema", js: "$schema", typ: "" }, | ||
{ json: "title", js: "title", typ: "" }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("InterventionProperties") }, | ||
{ json: "required", js: "required", typ: a("") }, | ||
], false), | ||
"InterventionProperties": o([ | ||
{ json: "operationid", js: "operationid", typ: r("Reason") }, | ||
{ json: "datetime", js: "datetime", typ: r("Datetime") }, | ||
{ json: "admin", js: "admin", typ: r("Admin") }, | ||
{ json: "request", js: "request", typ: r("Request") }, | ||
], false), | ||
"Admin": o([ | ||
{ json: "oneOf", js: "oneOf", typ: a(r("AdminOneOf")) }, | ||
], false), | ||
"AdminOneOf": o([ | ||
{ json: "type", js: "type", typ: r("Type") }, | ||
{ json: "format", js: "format", typ: "" }, | ||
], false), | ||
"Datetime": o([ | ||
{ json: "type", js: "type", typ: r("Type") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "format", js: "format", typ: "" }, | ||
], false), | ||
"Request": o([ | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("RequestProperties") }, | ||
{ json: "required", js: "required", typ: a("") }, | ||
], false), | ||
"RequestProperties": o([ | ||
{ json: "query", js: "query", typ: r("Body") }, | ||
{ json: "body", js: "body", typ: r("Body") }, | ||
], false), | ||
"Body": o([ | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("BodyProperties") }, | ||
{ json: "additionalProperties", js: "additionalProperties", typ: true }, | ||
], false), | ||
"BodyProperties": o([ | ||
], false), | ||
"Player": o([ | ||
@@ -579,3 +598,3 @@ { json: "$schema", js: "$schema", typ: "" }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("PlayerProperties") }, | ||
@@ -585,3 +604,3 @@ { json: "required", js: "required", typ: a("") }, | ||
"PlayerProperties": o([ | ||
{ json: "dbvId", js: "dbvId", typ: r("Operationid") }, | ||
{ json: "dbvId", js: "dbvId", typ: r("Reason") }, | ||
{ json: "name", js: "name", typ: r("Danger") }, | ||
@@ -593,3 +612,3 @@ ], false), | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("SuitClass") }, | ||
@@ -603,3 +622,3 @@ { json: "minItems", js: "minItems", typ: 0 }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("RequestResultProperties") }, | ||
@@ -622,3 +641,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("RoundProperties") }, | ||
@@ -630,8 +649,8 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "tableNr", js: "tableNr", typ: r("Danger") }, | ||
{ json: "NS", js: "NS", typ: r("Operationid") }, | ||
{ json: "EW", js: "EW", typ: r("Operationid") }, | ||
{ json: "NS", js: "NS", typ: r("Reason") }, | ||
{ json: "EW", js: "EW", typ: r("Reason") }, | ||
{ json: "deals", js: "deals", typ: r("PurpleDeals") }, | ||
], false), | ||
"PurpleDeals": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("DealsItems") }, | ||
@@ -644,8 +663,8 @@ { json: "minItems", js: "minItems", typ: 0 }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "properties", js: "properties", typ: r("StickyProperties") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("TentacledProperties") }, | ||
{ json: "required", js: "required", typ: a("") }, | ||
], false), | ||
"StickyProperties": o([ | ||
{ json: "collection", js: "collection", typ: r("Operationid") }, | ||
"TentacledProperties": o([ | ||
{ json: "collection", js: "collection", typ: r("Reason") }, | ||
{ json: "id", js: "id", typ: r("Danger") }, | ||
@@ -657,3 +676,3 @@ ], false), | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("ScoreProperties") }, | ||
@@ -673,3 +692,3 @@ { json: "required", js: "required", typ: a("") }, | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("TableMongodbProperties") }, | ||
@@ -684,3 +703,3 @@ { json: "required", js: "required", typ: a("") }, | ||
"ClientToken": o([ | ||
{ json: "oneOf", js: "oneOf", typ: a(r("Operationid")) }, | ||
{ json: "oneOf", js: "oneOf", typ: a(r("Reason")) }, | ||
], false), | ||
@@ -691,3 +710,3 @@ "TableStatus": o([ | ||
{ json: "description", js: "description", typ: "" }, | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("TableStatusProperties") }, | ||
@@ -705,11 +724,11 @@ { json: "required", js: "required", typ: a("") }, | ||
"BoardsNotYetEntered": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("BoardsNotYetEnteredItems") }, | ||
], false), | ||
"BoardsNotYetEnteredItems": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "properties", js: "properties", typ: r("IndigoProperties") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "properties", js: "properties", typ: r("StickyProperties") }, | ||
{ json: "required", js: "required", typ: a("") }, | ||
], false), | ||
"IndigoProperties": o([ | ||
"StickyProperties": o([ | ||
{ json: "boardNr", js: "boardNr", typ: r("BoardNr") }, | ||
@@ -719,7 +738,7 @@ { json: "missingDirections", js: "missingDirections", typ: r("MissingDirections") }, | ||
"MissingDirections": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("Value") }, | ||
], false), | ||
"FluffyDeals": o([ | ||
{ json: "type", js: "type", typ: r("PurpleType") }, | ||
{ json: "type", js: "type", typ: "" }, | ||
{ json: "items", js: "items", typ: r("SuitClass") }, | ||
@@ -734,9 +753,5 @@ ], false), | ||
], | ||
"SuitType": [ | ||
"Type": [ | ||
"string", | ||
], | ||
"PurpleType": [ | ||
"array", | ||
"object", | ||
], | ||
}; | ||
@@ -743,0 +758,0 @@ |
Sorry, the diff of this file is not supported yet
114305
1420