@mapletip/data 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +172 -2
- package/client/contract-compatibility.mjs +10 -0
- package/client/items.d.ts +28 -5
- package/client/items.js +59 -4
- package/client/map-geography.d.ts +4 -0
- package/client/map-geography.js +2 -0
- package/client/maps.d.ts +22 -0
- package/client/maps.js +25 -0
- package/client/monster-client.d.ts +11 -3
- package/client/monster-client.js +44 -5
- package/client/monsters.d.ts +27 -6
- package/client/monsters.js +30 -4
- package/client/static-client.d.ts +7 -5
- package/client/static-client.js +3 -2
- package/client/static-domains.d.ts +8 -1
- package/client/static-domains.js +27 -3
- package/generated/item-browse-pack-2.d.ts +83 -1
- package/generated/item-browse-pack-2.validator.js +2 -2
- package/generated/item-related-entity-browse-1.d.ts +48 -0
- package/generated/item-related-entity-browse-1.validator.js +1 -0
- package/generated/map-catalog-2-1.d.ts +103 -0
- package/generated/map-catalog-2-1.validator.d.ts +18 -0
- package/generated/map-catalog-2-1.validator.js +1 -0
- package/generated/map-geography.d.ts +79 -0
- package/generated/map-geography.validator.d.ts +18 -0
- package/generated/map-geography.validator.js +1 -0
- package/generated/monster-catalog-2-2.d.ts +332 -0
- package/generated/monster-catalog-2-2.validator.js +17 -0
- package/generated/monster-catalog-2-3.d.ts +339 -0
- package/generated/monster-catalog-2-3.validator.js +17 -0
- package/generated/monster-drop-browse.d.ts +123 -0
- package/generated/monster-drop-browse.validator.js +17 -0
- package/generated/monster-location-browse-1-1.d.ts +79 -0
- package/generated/monster-location-browse-1-1.validator.js +17 -0
- package/generated/monster-location-browse.d.ts +69 -0
- package/generated/monster-location-browse.validator.js +17 -0
- package/generated/product-manifest.d.ts +23 -0
- package/generated/product-manifest.validator.js +1 -1
- package/package.json +36 -2
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/* Generated automatically from Rust-owned wire definitions. Do not edit. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Typed drop category used by the browse roster. Free-text source labels are
|
|
5
|
+
* never promoted to a typed category.
|
|
6
|
+
*/
|
|
7
|
+
export type MonsterDropBrowseCategoryV1 =
|
|
8
|
+
| {
|
|
9
|
+
code: string;
|
|
10
|
+
kind: "equip-slot";
|
|
11
|
+
}
|
|
12
|
+
| {
|
|
13
|
+
kind: "item-class";
|
|
14
|
+
value: ItemBrowseClass;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
kind: "unknown";
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Canonical non-equipment Item class.
|
|
21
|
+
*/
|
|
22
|
+
export type ItemBrowseClass = "consume" | "etc" | "setup" | "cash" | "pet";
|
|
23
|
+
/**
|
|
24
|
+
* Compact catalog projection of [`FactState`]. It keeps the state and a
|
|
25
|
+
* positively observed value, retains the coverage witness for `absent`, and
|
|
26
|
+
* omits source attribution and explanatory metadata.
|
|
27
|
+
*/
|
|
28
|
+
export type CatalogFact =
|
|
29
|
+
| {
|
|
30
|
+
state: "known";
|
|
31
|
+
value: string;
|
|
32
|
+
}
|
|
33
|
+
| {
|
|
34
|
+
state: "unknown";
|
|
35
|
+
}
|
|
36
|
+
| {
|
|
37
|
+
coverageKey: CoverageKey;
|
|
38
|
+
state: "absent";
|
|
39
|
+
}
|
|
40
|
+
| {
|
|
41
|
+
state: "unsupported";
|
|
42
|
+
};
|
|
43
|
+
export type CoverageKey = string;
|
|
44
|
+
/**
|
|
45
|
+
* Projection state for a public reference.
|
|
46
|
+
*/
|
|
47
|
+
export type RefState = "resolved" | "unresolved" | "ambiguous" | "unknown" | "absent" | "unsupported";
|
|
48
|
+
/**
|
|
49
|
+
* One browse entry from the exact same assertion stream serialized into evidence packs.
|
|
50
|
+
*/
|
|
51
|
+
export type MonsterDropBrowseEntryV1 =
|
|
52
|
+
| {
|
|
53
|
+
assertionKind: "native";
|
|
54
|
+
/**
|
|
55
|
+
* Index into the artifact's sorted `items` table.
|
|
56
|
+
*/
|
|
57
|
+
item: number;
|
|
58
|
+
}
|
|
59
|
+
| {
|
|
60
|
+
assertionKind: "historical-overlay";
|
|
61
|
+
confidence: HistoricalDropConfidence;
|
|
62
|
+
/**
|
|
63
|
+
* Index into the artifact's sorted `items` table.
|
|
64
|
+
*/
|
|
65
|
+
item: number;
|
|
66
|
+
sourceBuild: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Confidence in a historical assertion as evidence about a target build.
|
|
70
|
+
*/
|
|
71
|
+
export type HistoricalDropConfidence = "maybe";
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* One versioned build-scoped Monster drop browse artifact.
|
|
75
|
+
*/
|
|
76
|
+
export interface MonsterDropBrowseV1 {
|
|
77
|
+
contractVersion: "1.0";
|
|
78
|
+
format: "mapletip.monster-drop-browse";
|
|
79
|
+
/**
|
|
80
|
+
* Distinct item facts sorted by resolved key or unresolved name fact.
|
|
81
|
+
*/
|
|
82
|
+
items: MonsterDropBrowseItemV1[];
|
|
83
|
+
records: {
|
|
84
|
+
[k: string]: MonsterDropBrowseRecordV1 | undefined;
|
|
85
|
+
};
|
|
86
|
+
scope: BuildScope;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Same-build item facts stored once per distinct item in a drop browse artifact.
|
|
90
|
+
*/
|
|
91
|
+
export interface MonsterDropBrowseItemV1 {
|
|
92
|
+
category: MonsterDropBrowseCategoryV1;
|
|
93
|
+
itemClass: CatalogFact;
|
|
94
|
+
itemName: CatalogFact;
|
|
95
|
+
itemRef: MonsterDropBrowseItemRefV1;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Compact item identity state for Monster drop browsing.
|
|
99
|
+
*/
|
|
100
|
+
export interface MonsterDropBrowseItemRefV1 {
|
|
101
|
+
key?: string | null;
|
|
102
|
+
state: RefState;
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Drop entries grouped under one Monster key.
|
|
106
|
+
*/
|
|
107
|
+
export interface MonsterDropBrowseRecordV1 {
|
|
108
|
+
entries: MonsterDropBrowseEntryV1[];
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Build scope specifying the game family and concrete build identity.
|
|
112
|
+
*/
|
|
113
|
+
export interface BuildScope {
|
|
114
|
+
/**
|
|
115
|
+
* Exact build identity (e.g., 'gms-v83', 'cw-cot2').
|
|
116
|
+
*/
|
|
117
|
+
build_id: string;
|
|
118
|
+
/**
|
|
119
|
+
* Family identity (e.g., 'gms', 'classic-world').
|
|
120
|
+
*/
|
|
121
|
+
family_id: string;
|
|
122
|
+
[k: string]: unknown | undefined;
|
|
123
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";export const validate = validate20;export default validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","title":"MonsterDropBrowseV1","description":"One versioned build-scoped Monster drop browse artifact.","type":"object","properties":{"contractVersion":{"type":"string","const":"1.0"},"format":{"type":"string","const":"mapletip.monster-drop-browse"},"items":{"description":"Distinct item facts sorted by resolved key or unresolved name fact.","type":"array","items":{"$ref":"#/$defs/MonsterDropBrowseItemV1"}},"records":{"type":"object","additionalProperties":{"$ref":"#/$defs/MonsterDropBrowseRecordV1"}},"scope":{"$ref":"#/$defs/BuildScope"}},"additionalProperties":false,"required":["format","contractVersion","scope","items","records"],"$defs":{"BuildScope":{"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]},"CatalogFact":{"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]},"CoverageKey":{"type":"string","minLength":1,"pattern":"\\S"},"HistoricalDropConfidence":{"description":"Confidence in a historical assertion as evidence about a target build.","type":"string","enum":["maybe"]},"ItemBrowseClass":{"description":"Canonical non-equipment Item class.","type":"string","enum":["consume","etc","setup","cash","pet"]},"MonsterDropBrowseCategoryV1":{"description":"Typed drop category used by the browse roster. Free-text source labels are\nnever promoted to a typed category.","oneOf":[{"description":"Equipment slot from the same-build Equipment product.","type":"object","properties":{"code":{"type":"string"},"kind":{"type":"string","const":"equip-slot"}},"additionalProperties":false,"required":["kind","code"]},{"description":"Canonical Item browse class from the same-build Item product.","type":"object","properties":{"kind":{"type":"string","const":"item-class"},"value":{"$ref":"#/$defs/ItemBrowseClass"}},"additionalProperties":false,"required":["kind","value"]},{"description":"Item or Equipment is unresolved, or its typed category is unavailable.","type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["kind"]}]},"MonsterDropBrowseEntryV1":{"description":"One browse entry from the exact same assertion stream serialized into evidence packs.","oneOf":[{"description":"Native exact-build evidence; overlay-only fields are not part of this variant.","type":"object","properties":{"assertionKind":{"type":"string","const":"native"},"item":{"description":"Index into the artifact's sorted `items` table.","type":"integer","format":"uint","minimum":0}},"additionalProperties":false,"required":["assertionKind","item"]},{"description":"Historical evidence keeps its source build and confidence caveat.","type":"object","properties":{"assertionKind":{"type":"string","const":"historical-overlay"},"confidence":{"$ref":"#/$defs/HistoricalDropConfidence"},"item":{"description":"Index into the artifact's sorted `items` table.","type":"integer","format":"uint","minimum":0},"sourceBuild":{"type":"string"}},"additionalProperties":false,"required":["assertionKind","item","sourceBuild","confidence"]}]},"MonsterDropBrowseItemRefV1":{"description":"Compact item identity state for Monster drop browsing.","type":"object","properties":{"key":{"type":["string","null"]},"state":{"$ref":"#/$defs/RefState"}},"additionalProperties":false,"required":["state"]},"MonsterDropBrowseItemV1":{"description":"Same-build item facts stored once per distinct item in a drop browse artifact.","type":"object","properties":{"category":{"$ref":"#/$defs/MonsterDropBrowseCategoryV1"},"itemClass":{"$ref":"#/$defs/CatalogFact"},"itemName":{"$ref":"#/$defs/CatalogFact"},"itemRef":{"$ref":"#/$defs/MonsterDropBrowseItemRefV1"}},"additionalProperties":false,"required":["itemRef","itemName","itemClass","category"]},"MonsterDropBrowseRecordV1":{"description":"Drop entries grouped under one Monster key.","type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/$defs/MonsterDropBrowseEntryV1"}}},"additionalProperties":false,"required":["entries"]},"RefState":{"description":"Projection state for a public reference.","type":"string","enum":["resolved","unresolved","ambiguous","unknown","absent","unsupported"]}}};const schema42 = {"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]};const schema32 = {"description":"Same-build item facts stored once per distinct item in a drop browse artifact.","type":"object","properties":{"category":{"$ref":"#/$defs/MonsterDropBrowseCategoryV1"},"itemClass":{"$ref":"#/$defs/CatalogFact"},"itemName":{"$ref":"#/$defs/CatalogFact"},"itemRef":{"$ref":"#/$defs/MonsterDropBrowseItemRefV1"}},"additionalProperties":false,"required":["itemRef","itemName","itemClass","category"]};const schema33 = {"description":"Typed drop category used by the browse roster. Free-text source labels are\nnever promoted to a typed category.","oneOf":[{"description":"Equipment slot from the same-build Equipment product.","type":"object","properties":{"code":{"type":"string"},"kind":{"type":"string","const":"equip-slot"}},"additionalProperties":false,"required":["kind","code"]},{"description":"Canonical Item browse class from the same-build Item product.","type":"object","properties":{"kind":{"type":"string","const":"item-class"},"value":{"$ref":"#/$defs/ItemBrowseClass"}},"additionalProperties":false,"required":["kind","value"]},{"description":"Item or Equipment is unresolved, or its typed category is unavailable.","type":"object","properties":{"kind":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["kind"]}]};const schema34 = {"description":"Canonical non-equipment Item class.","type":"string","enum":["consume","etc","setup","cash","pet"]};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.code === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "code"},message:"must have required property '"+"code"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "code") || (key0 === "kind"))){const err2 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.code !== undefined){if(typeof data.code !== "string"){const err3 = {instancePath:instancePath+"/code",schemaPath:"#/oneOf/0/properties/code/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.kind !== undefined){let data1 = data.kind;if(typeof data1 !== "string"){const err4 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/0/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if("equip-slot" !== data1){const err5 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/0/properties/kind/const",keyword:"const",params:{allowedValue: "equip-slot"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if(data.value === undefined){const err8 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}for(const key1 in data){if(!((key1 === "kind") || (key1 === "value"))){const err9 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.kind !== undefined){let data2 = data.kind;if(typeof data2 !== "string"){const err10 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/1/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if("item-class" !== data2){const err11 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/1/properties/kind/const",keyword:"const",params:{allowedValue: "item-class"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.value !== undefined){let data3 = data.value;if(typeof data3 !== "string"){const err12 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/ItemBrowseClass/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(!(((((data3 === "consume") || (data3 === "etc")) || (data3 === "setup")) || (data3 === "cash")) || (data3 === "pet"))){const err13 = {instancePath:instancePath+"/value",schemaPath:"#/$defs/ItemBrowseClass/enum",keyword:"enum",params:{allowedValues: schema34.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}var _valid0 = _errs8 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs16 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.kind === undefined){const err15 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "kind"},message:"must have required property '"+"kind"+"'"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}for(const key2 in data){if(!(key2 === "kind")){const err16 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.kind !== undefined){let data4 = data.kind;if(typeof data4 !== "string"){const err17 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/2/properties/kind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if("unknown" !== data4){const err18 = {instancePath:instancePath+"/kind",schemaPath:"#/oneOf/2/properties/kind/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}var _valid0 = _errs16 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}}}if(!valid0){const err20 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate22.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate22.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema35 = {"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]};const schema36 = {"type":"string","minLength":1,"pattern":"\\S"};const func1 = function ucs2length(str) {
|
|
2
|
+
const len = str.length;
|
|
3
|
+
let length = 0;
|
|
4
|
+
let pos = 0;
|
|
5
|
+
let value;
|
|
6
|
+
while (pos < len) {
|
|
7
|
+
length++;
|
|
8
|
+
value = str.charCodeAt(pos++);
|
|
9
|
+
if (value >= 0xd800 && value <= 0xdbff && pos < len) {
|
|
10
|
+
// high surrogate, and there is a next character
|
|
11
|
+
value = str.charCodeAt(pos);
|
|
12
|
+
if ((value & 0xfc00) === 0xdc00)
|
|
13
|
+
pos++; // low surrogate
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return length;
|
|
17
|
+
};const pattern4 = new RegExp("\\S", "u");function validate24(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate24.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.value === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "state") || (key0 === "value"))){const err2 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.state !== undefined){let data0 = data.state;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if("known" !== data0){const err4 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/const",keyword:"const",params:{allowedValue: "known"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.value !== undefined){if(typeof data.value !== "string"){const err5 = {instancePath:instancePath+"/value",schemaPath:"#/oneOf/0/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!(key1 === "state")){const err8 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.state !== undefined){let data2 = data.state;if(typeof data2 !== "string"){const err9 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if("unknown" !== data2){const err10 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs8 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err12 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.coverageKey === undefined){const err13 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "coverageKey"},message:"must have required property '"+"coverageKey"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key2 in data){if(!((key2 === "coverageKey") || (key2 === "state"))){const err14 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.coverageKey !== undefined){let data3 = data.coverageKey;if(typeof data3 === "string"){if(func1(data3) < 1){const err15 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(!pattern4.test(data3)){const err16 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/pattern",keyword:"pattern",params:{pattern: "\\S"},message:"must match pattern \""+"\\S"+"\""};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.state !== undefined){let data4 = data.state;if(typeof data4 !== "string"){const err18 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if("absent" !== data4){const err19 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/const",keyword:"const",params:{allowedValue: "absent"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs13 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err21 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}for(const key3 in data){if(!(key3 === "state")){const err22 = {instancePath,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.state !== undefined){let data5 = data.state;if(typeof data5 !== "string"){const err23 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if("unsupported" !== data5){const err24 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/const",keyword:"const",params:{allowedValue: "unsupported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid0 = _errs21 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;if(props0 !== true){props0 = true;}}}}}if(!valid0){const err26 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate24.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate24.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema37 = {"description":"Compact item identity state for Monster drop browsing.","type":"object","properties":{"key":{"type":["string","null"]},"state":{"$ref":"#/$defs/RefState"}},"additionalProperties":false,"required":["state"]};const schema38 = {"description":"Projection state for a public reference.","type":"string","enum":["resolved","unresolved","ambiguous","unknown","absent","unsupported"]};function validate27(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate27.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((key0 === "key") || (key0 === "state"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.key !== undefined){let data0 = data.key;if((typeof data0 !== "string") && (data0 !== null)){const err2 = {instancePath:instancePath+"/key",schemaPath:"#/properties/key/type",keyword:"type",params:{type: schema37.properties.key.type},message:"must be string,null"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.state !== undefined){let data1 = data.state;if(typeof data1 !== "string"){const err3 = {instancePath:instancePath+"/state",schemaPath:"#/$defs/RefState/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(!((((((data1 === "resolved") || (data1 === "unresolved")) || (data1 === "ambiguous")) || (data1 === "unknown")) || (data1 === "absent")) || (data1 === "unsupported"))){const err4 = {instancePath:instancePath+"/state",schemaPath:"#/$defs/RefState/enum",keyword:"enum",params:{allowedValues: schema38.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate27.errors = vErrors;return errors === 0;}validate27.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.itemRef === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "itemRef"},message:"must have required property '"+"itemRef"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.itemName === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "itemName"},message:"must have required property '"+"itemName"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.itemClass === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "itemClass"},message:"must have required property '"+"itemClass"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.category === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "category"},message:"must have required property '"+"category"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "category") || (key0 === "itemClass")) || (key0 === "itemName")) || (key0 === "itemRef"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.category !== undefined){if(!(validate22(data.category, {instancePath:instancePath+"/category",parentData:data,parentDataProperty:"category",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}if(data.itemClass !== undefined){if(!(validate24(data.itemClass, {instancePath:instancePath+"/itemClass",parentData:data,parentDataProperty:"itemClass",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}}if(data.itemName !== undefined){if(!(validate24(data.itemName, {instancePath:instancePath+"/itemName",parentData:data,parentDataProperty:"itemName",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate24.errors : vErrors.concat(validate24.errors);errors = vErrors.length;}}if(data.itemRef !== undefined){if(!(validate27(data.itemRef, {instancePath:instancePath+"/itemRef",parentData:data,parentDataProperty:"itemRef",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate27.errors : vErrors.concat(validate27.errors);errors = vErrors.length;}}}else {const err5 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema39 = {"description":"Drop entries grouped under one Monster key.","type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/$defs/MonsterDropBrowseEntryV1"}}},"additionalProperties":false,"required":["entries"]};const schema40 = {"description":"One browse entry from the exact same assertion stream serialized into evidence packs.","oneOf":[{"description":"Native exact-build evidence; overlay-only fields are not part of this variant.","type":"object","properties":{"assertionKind":{"type":"string","const":"native"},"item":{"description":"Index into the artifact's sorted `items` table.","type":"integer","format":"uint","minimum":0}},"additionalProperties":false,"required":["assertionKind","item"]},{"description":"Historical evidence keeps its source build and confidence caveat.","type":"object","properties":{"assertionKind":{"type":"string","const":"historical-overlay"},"confidence":{"$ref":"#/$defs/HistoricalDropConfidence"},"item":{"description":"Index into the artifact's sorted `items` table.","type":"integer","format":"uint","minimum":0},"sourceBuild":{"type":"string"}},"additionalProperties":false,"required":["assertionKind","item","sourceBuild","confidence"]}]};const schema41 = {"description":"Confidence in a historical assertion as evidence about a target build.","type":"string","enum":["maybe"]};function validate31(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate31.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.assertionKind === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "assertionKind"},message:"must have required property '"+"assertionKind"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.item === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "item"},message:"must have required property '"+"item"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "assertionKind") || (key0 === "item"))){const err2 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.assertionKind !== undefined){let data0 = data.assertionKind;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/assertionKind",schemaPath:"#/oneOf/0/properties/assertionKind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if("native" !== data0){const err4 = {instancePath:instancePath+"/assertionKind",schemaPath:"#/oneOf/0/properties/assertionKind/const",keyword:"const",params:{allowedValue: "native"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.item !== undefined){let data1 = data.item;if(!(((typeof data1 == "number") && (!(data1 % 1) && !isNaN(data1))) && (isFinite(data1)))){const err5 = {instancePath:instancePath+"/item",schemaPath:"#/oneOf/0/properties/item/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if((typeof data1 == "number") && (isFinite(data1))){if(data1 < 0 || isNaN(data1)){const err6 = {instancePath:instancePath+"/item",schemaPath:"#/oneOf/0/properties/item/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}}}else {const err7 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.assertionKind === undefined){const err8 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "assertionKind"},message:"must have required property '"+"assertionKind"+"'"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(data.item === undefined){const err9 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "item"},message:"must have required property '"+"item"+"'"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data.sourceBuild === undefined){const err10 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "sourceBuild"},message:"must have required property '"+"sourceBuild"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data.confidence === undefined){const err11 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "confidence"},message:"must have required property '"+"confidence"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}for(const key1 in data){if(!((((key1 === "assertionKind") || (key1 === "confidence")) || (key1 === "item")) || (key1 === "sourceBuild"))){const err12 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.assertionKind !== undefined){let data2 = data.assertionKind;if(typeof data2 !== "string"){const err13 = {instancePath:instancePath+"/assertionKind",schemaPath:"#/oneOf/1/properties/assertionKind/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if("historical-overlay" !== data2){const err14 = {instancePath:instancePath+"/assertionKind",schemaPath:"#/oneOf/1/properties/assertionKind/const",keyword:"const",params:{allowedValue: "historical-overlay"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.confidence !== undefined){let data3 = data.confidence;if(typeof data3 !== "string"){const err15 = {instancePath:instancePath+"/confidence",schemaPath:"#/$defs/HistoricalDropConfidence/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(!(data3 === "maybe")){const err16 = {instancePath:instancePath+"/confidence",schemaPath:"#/$defs/HistoricalDropConfidence/enum",keyword:"enum",params:{allowedValues: schema41.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}if(data.item !== undefined){let data4 = data.item;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err17 = {instancePath:instancePath+"/item",schemaPath:"#/oneOf/1/properties/item/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 < 0 || isNaN(data4)){const err18 = {instancePath:instancePath+"/item",schemaPath:"#/oneOf/1/properties/item/minimum",keyword:"minimum",params:{comparison: ">=", limit: 0},message:"must be >= 0"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}if(data.sourceBuild !== undefined){if(typeof data.sourceBuild !== "string"){const err19 = {instancePath:instancePath+"/sourceBuild",schemaPath:"#/oneOf/1/properties/sourceBuild/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs8 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}}if(!valid0){const err21 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate31.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate31.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate30(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate30.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.entries === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "entries"},message:"must have required property '"+"entries"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "entries")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.entries !== undefined){let data0 = data.entries;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0<len0; i0++){if(!(validate31(data0[i0], {instancePath:instancePath+"/entries/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.errors);errors = vErrors.length;}}}else {const err2 = {instancePath:instancePath+"/entries",schemaPath:"#/properties/entries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate30.errors = vErrors;return errors === 0;}validate30.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.format === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contractVersion === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contractVersion"},message:"must have required property '"+"contractVersion"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scope === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.items === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "items"},message:"must have required property '"+"items"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.records === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "records"},message:"must have required property '"+"records"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((key0 === "contractVersion") || (key0 === "format")) || (key0 === "items")) || (key0 === "records")) || (key0 === "scope"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.contractVersion !== undefined){let data0 = data.contractVersion;if(typeof data0 !== "string"){const err6 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if("1.0" !== data0){const err7 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/const",keyword:"const",params:{allowedValue: "1.0"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.format !== undefined){let data1 = data.format;if(typeof data1 !== "string"){const err8 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if("mapletip.monster-drop-browse" !== data1){const err9 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "mapletip.monster-drop-browse"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.items !== undefined){let data2 = data.items;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){if(!(validate21(data2[i0], {instancePath:instancePath+"/items/" + i0,parentData:data2,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}}}else {const err10 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.records !== undefined){let data4 = data.records;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){for(const key1 in data4){if(!(validate30(data4[key1], {instancePath:instancePath+"/records/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data4,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate30.errors : vErrors.concat(validate30.errors);errors = vErrors.length;}}}else {const err11 = {instancePath:instancePath+"/records",schemaPath:"#/properties/records/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.scope !== undefined){let data6 = data.scope;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){if(data6.family_id === undefined){const err12 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "family_id"},message:"must have required property '"+"family_id"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data6.build_id === undefined){const err13 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "build_id"},message:"must have required property '"+"build_id"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}if(data6.build_id !== undefined){if(typeof data6.build_id !== "string"){const err14 = {instancePath:instancePath+"/scope/build_id",schemaPath:"#/$defs/BuildScope/properties/build_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data6.family_id !== undefined){if(typeof data6.family_id !== "string"){const err15 = {instancePath:instancePath+"/scope/family_id",schemaPath:"#/$defs/BuildScope/properties/family_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}}else {const err16 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}}else {const err17 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/* Generated automatically from Rust-owned wire definitions. Do not edit. */
|
|
2
|
+
|
|
3
|
+
export type MapGeographyProvenance =
|
|
4
|
+
"reviewed-overlay" | "source-region-allowlist" | "source-map-mark" | "source-classification" | "none";
|
|
5
|
+
export type MapGeographyReviewStatus = "verified" | "supported";
|
|
6
|
+
/**
|
|
7
|
+
* Compact catalog projection of [`FactState`]. It keeps the state and a
|
|
8
|
+
* positively observed value, retains the coverage witness for `absent`, and
|
|
9
|
+
* omits source attribution and explanatory metadata.
|
|
10
|
+
*/
|
|
11
|
+
export type CatalogFact =
|
|
12
|
+
| {
|
|
13
|
+
state: "known";
|
|
14
|
+
value: string;
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
state: "unknown";
|
|
18
|
+
}
|
|
19
|
+
| {
|
|
20
|
+
coverageKey: CoverageKey;
|
|
21
|
+
state: "absent";
|
|
22
|
+
}
|
|
23
|
+
| {
|
|
24
|
+
state: "unsupported";
|
|
25
|
+
};
|
|
26
|
+
export type CoverageKey = string;
|
|
27
|
+
|
|
28
|
+
export interface MonsterLocationBrowseV1_1 {
|
|
29
|
+
contractVersion: "1.1";
|
|
30
|
+
format: "mapletip.monster-location-browse";
|
|
31
|
+
records: {
|
|
32
|
+
[k: string]: MonsterLocationBrowseRecordV1_1 | undefined;
|
|
33
|
+
};
|
|
34
|
+
scope: BuildScope;
|
|
35
|
+
}
|
|
36
|
+
export interface MonsterLocationBrowseRecordV1_1 {
|
|
37
|
+
entries: MonsterLocationBrowseEntryV1_1[];
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* One Monster location entry carrying the corresponding Map geography fact
|
|
41
|
+
* and its display labels from the build's geography vocabulary.
|
|
42
|
+
*/
|
|
43
|
+
export interface MonsterLocationBrowseEntryV1_1 {
|
|
44
|
+
geography: MapGeographyBrowseFact;
|
|
45
|
+
mapKey: string;
|
|
46
|
+
mapName: CatalogFact;
|
|
47
|
+
mapSourceId: string;
|
|
48
|
+
placementCount: number;
|
|
49
|
+
regionCode?: string | null;
|
|
50
|
+
streetName?: string | null;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Map geography values and vocabulary labels joined by the Map source ID for
|
|
54
|
+
* Monster location-browse projection.
|
|
55
|
+
*/
|
|
56
|
+
export interface MapGeographyBrowseFact {
|
|
57
|
+
areaKey?: string | null;
|
|
58
|
+
areaLabel?: string | null;
|
|
59
|
+
collectionKey?: string | null;
|
|
60
|
+
collectionLabel?: string | null;
|
|
61
|
+
provenance: MapGeographyProvenance;
|
|
62
|
+
regionKey?: string | null;
|
|
63
|
+
regionLabel?: string | null;
|
|
64
|
+
status?: MapGeographyReviewStatus | null;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Build scope specifying the game family and concrete build identity.
|
|
68
|
+
*/
|
|
69
|
+
export interface BuildScope {
|
|
70
|
+
/**
|
|
71
|
+
* Exact build identity (e.g., 'gms-v83', 'cw-cot2').
|
|
72
|
+
*/
|
|
73
|
+
build_id: string;
|
|
74
|
+
/**
|
|
75
|
+
* Family identity (e.g., 'gms', 'classic-world').
|
|
76
|
+
*/
|
|
77
|
+
family_id: string;
|
|
78
|
+
[k: string]: unknown | undefined;
|
|
79
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";export const validate = validate20;export default validate20;const schema31 = {"$schema":"https://json-schema.org/draft/2020-12/schema","title":"MonsterLocationBrowseV1_1","type":"object","properties":{"contractVersion":{"type":"string","const":"1.1"},"format":{"type":"string","const":"mapletip.monster-location-browse"},"records":{"type":"object","additionalProperties":{"$ref":"#/$defs/MonsterLocationBrowseRecordV1_1"}},"scope":{"$ref":"#/$defs/BuildScope"}},"additionalProperties":false,"required":["format","contractVersion","scope","records"],"$defs":{"BuildScope":{"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]},"CatalogFact":{"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]},"CoverageKey":{"type":"string","minLength":1,"pattern":"\\S"},"MapGeographyBrowseFact":{"description":"Map geography values and vocabulary labels joined by the Map source ID for\nMonster location-browse projection.","type":"object","properties":{"areaKey":{"type":["string","null"]},"areaLabel":{"type":["string","null"]},"collectionKey":{"type":["string","null"]},"collectionLabel":{"type":["string","null"]},"provenance":{"$ref":"#/$defs/MapGeographyProvenance"},"regionKey":{"type":["string","null"]},"regionLabel":{"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/$defs/MapGeographyReviewStatus"},{"type":"null"}]}},"additionalProperties":false,"required":["provenance"]},"MapGeographyProvenance":{"type":"string","enum":["reviewed-overlay","source-region-allowlist","source-map-mark","source-classification","none"]},"MapGeographyReviewStatus":{"type":"string","enum":["verified","supported"]},"MonsterLocationBrowseEntryV1_1":{"description":"One Monster location entry carrying the corresponding Map geography fact\nand its display labels from the build's geography vocabulary.","type":"object","properties":{"geography":{"$ref":"#/$defs/MapGeographyBrowseFact"},"mapKey":{"type":"string"},"mapName":{"$ref":"#/$defs/CatalogFact"},"mapSourceId":{"type":"string"},"placementCount":{"type":"integer","format":"uint","maximum":9007199254740991,"minimum":1},"regionCode":{"type":["string","null"]},"streetName":{"type":["string","null"]}},"additionalProperties":false,"required":["mapKey","mapSourceId","mapName","placementCount","geography"]},"MonsterLocationBrowseRecordV1_1":{"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/$defs/MonsterLocationBrowseEntryV1_1"}}},"additionalProperties":false,"required":["entries"]}}};const schema39 = {"description":"Build scope specifying the game family and concrete build identity.","type":"object","properties":{"build_id":{"description":"Exact build identity (e.g., 'gms-v83', 'cw-cot2').","type":"string"},"family_id":{"description":"Family identity (e.g., 'gms', 'classic-world').","type":"string"}},"required":["family_id","build_id"]};const schema32 = {"type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/$defs/MonsterLocationBrowseEntryV1_1"}}},"additionalProperties":false,"required":["entries"]};const schema33 = {"description":"One Monster location entry carrying the corresponding Map geography fact\nand its display labels from the build's geography vocabulary.","type":"object","properties":{"geography":{"$ref":"#/$defs/MapGeographyBrowseFact"},"mapKey":{"type":"string"},"mapName":{"$ref":"#/$defs/CatalogFact"},"mapSourceId":{"type":"string"},"placementCount":{"type":"integer","format":"uint","maximum":9007199254740991,"minimum":1},"regionCode":{"type":["string","null"]},"streetName":{"type":["string","null"]}},"additionalProperties":false,"required":["mapKey","mapSourceId","mapName","placementCount","geography"]};const schema34 = {"description":"Map geography values and vocabulary labels joined by the Map source ID for\nMonster location-browse projection.","type":"object","properties":{"areaKey":{"type":["string","null"]},"areaLabel":{"type":["string","null"]},"collectionKey":{"type":["string","null"]},"collectionLabel":{"type":["string","null"]},"provenance":{"$ref":"#/$defs/MapGeographyProvenance"},"regionKey":{"type":["string","null"]},"regionLabel":{"type":["string","null"]},"status":{"anyOf":[{"$ref":"#/$defs/MapGeographyReviewStatus"},{"type":"null"}]}},"additionalProperties":false,"required":["provenance"]};const schema35 = {"type":"string","enum":["reviewed-overlay","source-region-allowlist","source-map-mark","source-classification","none"]};const schema36 = {"type":"string","enum":["verified","supported"]};function validate23(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate23.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.provenance === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "provenance"},message:"must have required property '"+"provenance"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!((((((((key0 === "areaKey") || (key0 === "areaLabel")) || (key0 === "collectionKey")) || (key0 === "collectionLabel")) || (key0 === "provenance")) || (key0 === "regionKey")) || (key0 === "regionLabel")) || (key0 === "status"))){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.areaKey !== undefined){let data0 = data.areaKey;if((typeof data0 !== "string") && (data0 !== null)){const err2 = {instancePath:instancePath+"/areaKey",schemaPath:"#/properties/areaKey/type",keyword:"type",params:{type: schema34.properties.areaKey.type},message:"must be string,null"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.areaLabel !== undefined){let data1 = data.areaLabel;if((typeof data1 !== "string") && (data1 !== null)){const err3 = {instancePath:instancePath+"/areaLabel",schemaPath:"#/properties/areaLabel/type",keyword:"type",params:{type: schema34.properties.areaLabel.type},message:"must be string,null"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}if(data.collectionKey !== undefined){let data2 = data.collectionKey;if((typeof data2 !== "string") && (data2 !== null)){const err4 = {instancePath:instancePath+"/collectionKey",schemaPath:"#/properties/collectionKey/type",keyword:"type",params:{type: schema34.properties.collectionKey.type},message:"must be string,null"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.collectionLabel !== undefined){let data3 = data.collectionLabel;if((typeof data3 !== "string") && (data3 !== null)){const err5 = {instancePath:instancePath+"/collectionLabel",schemaPath:"#/properties/collectionLabel/type",keyword:"type",params:{type: schema34.properties.collectionLabel.type},message:"must be string,null"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.provenance !== undefined){let data4 = data.provenance;if(typeof data4 !== "string"){const err6 = {instancePath:instancePath+"/provenance",schemaPath:"#/$defs/MapGeographyProvenance/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}if(!(((((data4 === "reviewed-overlay") || (data4 === "source-region-allowlist")) || (data4 === "source-map-mark")) || (data4 === "source-classification")) || (data4 === "none"))){const err7 = {instancePath:instancePath+"/provenance",schemaPath:"#/$defs/MapGeographyProvenance/enum",keyword:"enum",params:{allowedValues: schema35.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.regionKey !== undefined){let data5 = data.regionKey;if((typeof data5 !== "string") && (data5 !== null)){const err8 = {instancePath:instancePath+"/regionKey",schemaPath:"#/properties/regionKey/type",keyword:"type",params:{type: schema34.properties.regionKey.type},message:"must be string,null"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.regionLabel !== undefined){let data6 = data.regionLabel;if((typeof data6 !== "string") && (data6 !== null)){const err9 = {instancePath:instancePath+"/regionLabel",schemaPath:"#/properties/regionLabel/type",keyword:"type",params:{type: schema34.properties.regionLabel.type},message:"must be string,null"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.status !== undefined){let data7 = data.status;const _errs18 = errors;let valid2 = false;const _errs19 = errors;if(typeof data7 !== "string"){const err10 = {instancePath:instancePath+"/status",schemaPath:"#/$defs/MapGeographyReviewStatus/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(!((data7 === "verified") || (data7 === "supported"))){const err11 = {instancePath:instancePath+"/status",schemaPath:"#/$defs/MapGeographyReviewStatus/enum",keyword:"enum",params:{allowedValues: schema36.enum},message:"must be equal to one of the allowed values"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs19 === errors;valid2 = valid2 || _valid0;const _errs22 = errors;if(data7 !== null){const err12 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf/1/type",keyword:"type",params:{type: "null"},message:"must be null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}var _valid0 = _errs22 === errors;valid2 = valid2 || _valid0;if(!valid2){const err13 = {instancePath:instancePath+"/status",schemaPath:"#/properties/status/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}else {errors = _errs18;if(vErrors !== null){if(_errs18){vErrors.length = _errs18;}else {vErrors = null;}}}}}else {const err14 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}validate23.errors = vErrors;return errors === 0;}validate23.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema37 = {"description":"Compact catalog projection of [`FactState`]. It keeps the state and a\npositively observed value, retains the coverage witness for `absent`, and\nomits source attribution and explanatory metadata.","oneOf":[{"description":"A positively observed catalog value.","type":"object","properties":{"state":{"type":"string","const":"known"},"value":{"type":"string"}},"additionalProperties":false,"required":["state","value"]},{"description":"The value could not be established.","type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"description":"No value was present under a source scope with complete coverage.","type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"description":"The producer cannot supply the fact.","type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]};const schema38 = {"type":"string","minLength":1,"pattern":"\\S"};const func1 = function ucs2length(str) {
|
|
2
|
+
const len = str.length;
|
|
3
|
+
let length = 0;
|
|
4
|
+
let pos = 0;
|
|
5
|
+
let value;
|
|
6
|
+
while (pos < len) {
|
|
7
|
+
length++;
|
|
8
|
+
value = str.charCodeAt(pos++);
|
|
9
|
+
if (value >= 0xd800 && value <= 0xdbff && pos < len) {
|
|
10
|
+
// high surrogate, and there is a next character
|
|
11
|
+
value = str.charCodeAt(pos);
|
|
12
|
+
if ((value & 0xfc00) === 0xdc00)
|
|
13
|
+
pos++; // low surrogate
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return length;
|
|
17
|
+
};const pattern4 = new RegExp("\\S", "u");function validate25(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate25.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}const _errs0 = errors;let valid0 = false;let passing0 = null;const _errs1 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err0 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.value === undefined){const err1 = {instancePath,schemaPath:"#/oneOf/0/required",keyword:"required",params:{missingProperty: "value"},message:"must have required property '"+"value"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}for(const key0 in data){if(!((key0 === "state") || (key0 === "value"))){const err2 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}if(data.state !== undefined){let data0 = data.state;if(typeof data0 !== "string"){const err3 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if("known" !== data0){const err4 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/const",keyword:"const",params:{allowedValue: "known"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.value !== undefined){if(typeof data.value !== "string"){const err5 = {instancePath:instancePath+"/value",schemaPath:"#/oneOf/0/properties/value/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}}else {const err6 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs8 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err7 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}for(const key1 in data){if(!(key1 === "state")){const err8 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.state !== undefined){let data2 = data.state;if(typeof data2 !== "string"){const err9 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if("unknown" !== data2){const err10 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}else {const err11 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}var _valid0 = _errs8 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs13 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err12 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}if(data.coverageKey === undefined){const err13 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "coverageKey"},message:"must have required property '"+"coverageKey"+"'"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}for(const key2 in data){if(!((key2 === "coverageKey") || (key2 === "state"))){const err14 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}if(data.coverageKey !== undefined){let data3 = data.coverageKey;if(typeof data3 === "string"){if(func1(data3) < 1){const err15 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(!pattern4.test(data3)){const err16 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/pattern",keyword:"pattern",params:{pattern: "\\S"},message:"must match pattern \""+"\\S"+"\""};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}}else {const err17 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}if(data.state !== undefined){let data4 = data.state;if(typeof data4 !== "string"){const err18 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}if("absent" !== data4){const err19 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/const",keyword:"const",params:{allowedValue: "absent"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}}}else {const err20 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err20];}else {vErrors.push(err20);}errors++;}var _valid0 = _errs13 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}const _errs21 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err21 = {instancePath,schemaPath:"#/oneOf/3/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err21];}else {vErrors.push(err21);}errors++;}for(const key3 in data){if(!(key3 === "state")){const err22 = {instancePath,schemaPath:"#/oneOf/3/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key3},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err22];}else {vErrors.push(err22);}errors++;}}if(data.state !== undefined){let data5 = data.state;if(typeof data5 !== "string"){const err23 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err23];}else {vErrors.push(err23);}errors++;}if("unsupported" !== data5){const err24 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/3/properties/state/const",keyword:"const",params:{allowedValue: "unsupported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err24];}else {vErrors.push(err24);}errors++;}}}else {const err25 = {instancePath,schemaPath:"#/oneOf/3/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err25];}else {vErrors.push(err25);}errors++;}var _valid0 = _errs21 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 3];}else {if(_valid0){valid0 = true;passing0 = 3;if(props0 !== true){props0 = true;}}}}}if(!valid0){const err26 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err26];}else {vErrors.push(err26);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate25.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate25.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate22(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate22.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.mapKey === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mapKey"},message:"must have required property '"+"mapKey"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.mapSourceId === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mapSourceId"},message:"must have required property '"+"mapSourceId"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.mapName === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "mapName"},message:"must have required property '"+"mapName"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.placementCount === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "placementCount"},message:"must have required property '"+"placementCount"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}if(data.geography === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "geography"},message:"must have required property '"+"geography"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}for(const key0 in data){if(!(((((((key0 === "geography") || (key0 === "mapKey")) || (key0 === "mapName")) || (key0 === "mapSourceId")) || (key0 === "placementCount")) || (key0 === "regionCode")) || (key0 === "streetName"))){const err5 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}}if(data.geography !== undefined){if(!(validate23(data.geography, {instancePath:instancePath+"/geography",parentData:data,parentDataProperty:"geography",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate23.errors : vErrors.concat(validate23.errors);errors = vErrors.length;}}if(data.mapKey !== undefined){if(typeof data.mapKey !== "string"){const err6 = {instancePath:instancePath+"/mapKey",schemaPath:"#/properties/mapKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.mapName !== undefined){if(!(validate25(data.mapName, {instancePath:instancePath+"/mapName",parentData:data,parentDataProperty:"mapName",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}if(data.mapSourceId !== undefined){if(typeof data.mapSourceId !== "string"){const err7 = {instancePath:instancePath+"/mapSourceId",schemaPath:"#/properties/mapSourceId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.placementCount !== undefined){let data4 = data.placementCount;if(!(((typeof data4 == "number") && (!(data4 % 1) && !isNaN(data4))) && (isFinite(data4)))){const err8 = {instancePath:instancePath+"/placementCount",schemaPath:"#/properties/placementCount/type",keyword:"type",params:{type: "integer"},message:"must be integer"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if((typeof data4 == "number") && (isFinite(data4))){if(data4 > 9007199254740991 || isNaN(data4)){const err9 = {instancePath:instancePath+"/placementCount",schemaPath:"#/properties/placementCount/maximum",keyword:"maximum",params:{comparison: "<=", limit: 9007199254740991},message:"must be <= 9007199254740991"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if(data4 < 1 || isNaN(data4)){const err10 = {instancePath:instancePath+"/placementCount",schemaPath:"#/properties/placementCount/minimum",keyword:"minimum",params:{comparison: ">=", limit: 1},message:"must be >= 1"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}}if(data.regionCode !== undefined){let data5 = data.regionCode;if((typeof data5 !== "string") && (data5 !== null)){const err11 = {instancePath:instancePath+"/regionCode",schemaPath:"#/properties/regionCode/type",keyword:"type",params:{type: schema33.properties.regionCode.type},message:"must be string,null"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.streetName !== undefined){let data6 = data.streetName;if((typeof data6 !== "string") && (data6 !== null)){const err12 = {instancePath:instancePath+"/streetName",schemaPath:"#/properties/streetName/type",keyword:"type",params:{type: schema33.properties.streetName.type},message:"must be string,null"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}validate22.errors = vErrors;return errors === 0;}validate22.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate21(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate21.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.entries === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "entries"},message:"must have required property '"+"entries"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}for(const key0 in data){if(!(key0 === "entries")){const err1 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.entries !== undefined){let data0 = data.entries;if(Array.isArray(data0)){const len0 = data0.length;for(let i0=0; i0<len0; i0++){if(!(validate22(data0[i0], {instancePath:instancePath+"/entries/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}}}else {const err2 = {instancePath:instancePath+"/entries",schemaPath:"#/properties/entries/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}}else {const err3 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}validate21.errors = vErrors;return errors === 0;}validate21.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};function validate20(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate20.evaluated;if(evaluated0.dynamicProps){evaluated0.props = undefined;}if(evaluated0.dynamicItems){evaluated0.items = undefined;}if(data && typeof data == "object" && !Array.isArray(data)){if(data.format === undefined){const err0 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "format"},message:"must have required property '"+"format"+"'"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(data.contractVersion === undefined){const err1 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "contractVersion"},message:"must have required property '"+"contractVersion"+"'"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(data.scope === undefined){const err2 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "scope"},message:"must have required property '"+"scope"+"'"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if(data.records === undefined){const err3 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "records"},message:"must have required property '"+"records"+"'"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}for(const key0 in data){if(!((((key0 === "contractVersion") || (key0 === "format")) || (key0 === "records")) || (key0 === "scope"))){const err4 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}}if(data.contractVersion !== undefined){let data0 = data.contractVersion;if(typeof data0 !== "string"){const err5 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if("1.1" !== data0){const err6 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/const",keyword:"const",params:{allowedValue: "1.1"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.format !== undefined){let data1 = data.format;if(typeof data1 !== "string"){const err7 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if("mapletip.monster-location-browse" !== data1){const err8 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/const",keyword:"const",params:{allowedValue: "mapletip.monster-location-browse"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.records !== undefined){let data2 = data.records;if(data2 && typeof data2 == "object" && !Array.isArray(data2)){for(const key1 in data2){if(!(validate21(data2[key1], {instancePath:instancePath+"/records/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data2,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}}}else {const err9 = {instancePath:instancePath+"/records",schemaPath:"#/properties/records/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}if(data.scope !== undefined){let data4 = data.scope;if(data4 && typeof data4 == "object" && !Array.isArray(data4)){if(data4.family_id === undefined){const err10 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "family_id"},message:"must have required property '"+"family_id"+"'"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}if(data4.build_id === undefined){const err11 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "build_id"},message:"must have required property '"+"build_id"+"'"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if(data4.build_id !== undefined){if(typeof data4.build_id !== "string"){const err12 = {instancePath:instancePath+"/scope/build_id",schemaPath:"#/$defs/BuildScope/properties/build_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data4.family_id !== undefined){if(typeof data4.family_id !== "string"){const err13 = {instancePath:instancePath+"/scope/family_id",schemaPath:"#/$defs/BuildScope/properties/family_id/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}}else {const err14 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}}}else {const err15 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/* Generated automatically from Rust-owned wire definitions. Do not edit. */
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Compact catalog projection of [`FactState`]. It keeps the state and a
|
|
5
|
+
* positively observed value, retains the coverage witness for `absent`, and
|
|
6
|
+
* omits source attribution and explanatory metadata.
|
|
7
|
+
*/
|
|
8
|
+
export type CatalogFact =
|
|
9
|
+
| {
|
|
10
|
+
state: "known";
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
| {
|
|
14
|
+
state: "unknown";
|
|
15
|
+
}
|
|
16
|
+
| {
|
|
17
|
+
coverageKey: CoverageKey;
|
|
18
|
+
state: "absent";
|
|
19
|
+
}
|
|
20
|
+
| {
|
|
21
|
+
state: "unsupported";
|
|
22
|
+
};
|
|
23
|
+
export type CoverageKey = string;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* One versioned build-scoped Monster location browse artifact.
|
|
27
|
+
*/
|
|
28
|
+
export interface MonsterLocationBrowseV1 {
|
|
29
|
+
contractVersion: "1.0";
|
|
30
|
+
format: "mapletip.monster-location-browse";
|
|
31
|
+
records: {
|
|
32
|
+
[k: string]: MonsterLocationBrowseRecordV1 | undefined;
|
|
33
|
+
};
|
|
34
|
+
scope: BuildScope;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Location entries grouped under one Monster key.
|
|
38
|
+
*/
|
|
39
|
+
export interface MonsterLocationBrowseRecordV1 {
|
|
40
|
+
entries: MonsterLocationBrowseEntryV1[];
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* One compact map entry for Monster location browsing; placement detail stays in packs.
|
|
44
|
+
*/
|
|
45
|
+
export interface MonsterLocationBrowseEntryV1 {
|
|
46
|
+
mapKey: string;
|
|
47
|
+
mapName: CatalogFact;
|
|
48
|
+
mapSourceId: string;
|
|
49
|
+
placementCount: number;
|
|
50
|
+
/**
|
|
51
|
+
* Raw source classification, not a geographic region.
|
|
52
|
+
*/
|
|
53
|
+
regionCode?: string | null;
|
|
54
|
+
streetName?: string | null;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Build scope specifying the game family and concrete build identity.
|
|
58
|
+
*/
|
|
59
|
+
export interface BuildScope {
|
|
60
|
+
/**
|
|
61
|
+
* Exact build identity (e.g., 'gms-v83', 'cw-cot2').
|
|
62
|
+
*/
|
|
63
|
+
build_id: string;
|
|
64
|
+
/**
|
|
65
|
+
* Family identity (e.g., 'gms', 'classic-world').
|
|
66
|
+
*/
|
|
67
|
+
family_id: string;
|
|
68
|
+
[k: string]: unknown | undefined;
|
|
69
|
+
}
|