@mapletip/data 0.5.0 → 0.6.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.
@@ -0,0 +1,150 @@
1
+ /* Generated automatically from Rust-owned wire definitions. Do not edit. */
2
+
3
+ /**
4
+ * Compact icon fact aligned by index with `MonsterDropBrowseV1_1.items`.
5
+ *
6
+ * A string is a known, compact Media content ID. Object variants preserve the
7
+ * original explicit non-known catalog states without repeating a known-state
8
+ * wrapper around every digest.
9
+ */
10
+ export type DropBrowseIconV1_1 = CompactMediaContentId | DropBrowseIconNonKnownV1_1;
11
+ export type CompactMediaContentId = string;
12
+ /**
13
+ * Non-known Media icon states retained by compact drop browse revision 1.1.
14
+ */
15
+ export type DropBrowseIconNonKnownV1_1 =
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
+ * Typed drop category used by the browse roster. Free-text source labels are
29
+ * never promoted to a typed category.
30
+ */
31
+ export type MonsterDropBrowseCategoryV1 =
32
+ | {
33
+ code: string;
34
+ kind: "equip-slot";
35
+ }
36
+ | {
37
+ kind: "item-class";
38
+ value: ItemBrowseClass;
39
+ }
40
+ | {
41
+ kind: "unknown";
42
+ };
43
+ /**
44
+ * Canonical non-equipment Item class.
45
+ */
46
+ export type ItemBrowseClass = "consume" | "etc" | "setup" | "cash" | "pet";
47
+ /**
48
+ * Compact catalog projection of [`FactState`]. It keeps the state and a
49
+ * positively observed value, retains the coverage witness for `absent`, and
50
+ * omits source attribution and explanatory metadata.
51
+ */
52
+ export type CatalogFact =
53
+ | {
54
+ state: "known";
55
+ value: string;
56
+ }
57
+ | {
58
+ state: "unknown";
59
+ }
60
+ | {
61
+ coverageKey: CoverageKey;
62
+ state: "absent";
63
+ }
64
+ | {
65
+ state: "unsupported";
66
+ };
67
+ /**
68
+ * Projection state for a public reference.
69
+ */
70
+ export type RefState = "resolved" | "unresolved" | "ambiguous" | "unknown" | "absent" | "unsupported";
71
+ /**
72
+ * One browse entry from the exact same assertion stream serialized into evidence packs.
73
+ */
74
+ export type MonsterDropBrowseEntryV1 =
75
+ | {
76
+ assertionKind: "native";
77
+ /**
78
+ * Index into the artifact's sorted `items` table.
79
+ */
80
+ item: number;
81
+ }
82
+ | {
83
+ assertionKind: "historical-overlay";
84
+ confidence: HistoricalDropConfidence;
85
+ /**
86
+ * Index into the artifact's sorted `items` table.
87
+ */
88
+ item: number;
89
+ sourceBuild: string;
90
+ };
91
+ /**
92
+ * Confidence in a historical assertion as evidence about a target build.
93
+ */
94
+ export type HistoricalDropConfidence = "maybe";
95
+
96
+ /**
97
+ * Drop browse artifact revision 1.1 carries the same-build Media icon fact.
98
+ */
99
+ export interface MonsterDropBrowseV1_1 {
100
+ contractVersion: "1.1";
101
+ format: "mapletip.monster-drop-browse";
102
+ /**
103
+ * Compact icon facts in the same order as `items`.
104
+ */
105
+ itemIcons: DropBrowseIconV1_1[];
106
+ /**
107
+ * Distinct item facts sorted by resolved key or unresolved name fact.
108
+ */
109
+ items: MonsterDropBrowseItemV1_1[];
110
+ records: {
111
+ [k: string]: MonsterDropBrowseRecordV1 | undefined;
112
+ };
113
+ scope: BuildScope;
114
+ }
115
+ /**
116
+ * Same-build item facts stored once per distinct item in drop browse revision 1.1.
117
+ */
118
+ export interface MonsterDropBrowseItemV1_1 {
119
+ category: MonsterDropBrowseCategoryV1;
120
+ itemClass: CatalogFact;
121
+ itemName: CatalogFact;
122
+ itemRef: MonsterDropBrowseItemRefV1;
123
+ }
124
+ /**
125
+ * Compact item identity state for Monster drop browsing.
126
+ */
127
+ export interface MonsterDropBrowseItemRefV1 {
128
+ key?: string | null;
129
+ state: RefState;
130
+ }
131
+ /**
132
+ * Drop entries grouped under one Monster key.
133
+ */
134
+ export interface MonsterDropBrowseRecordV1 {
135
+ entries: MonsterDropBrowseEntryV1[];
136
+ }
137
+ /**
138
+ * Build scope specifying the game family and concrete build identity.
139
+ */
140
+ export interface BuildScope {
141
+ /**
142
+ * Exact build identity (e.g., 'gms-v83', 'cw-cot2').
143
+ */
144
+ build_id: string;
145
+ /**
146
+ * Family identity (e.g., 'gms', 'classic-world').
147
+ */
148
+ family_id: string;
149
+ [k: string]: unknown | undefined;
150
+ }
@@ -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_1","description":"Drop browse artifact revision 1.1 carries the same-build Media icon fact.","type":"object","properties":{"contractVersion":{"type":"string","const":"1.1"},"format":{"type":"string","const":"mapletip.monster-drop-browse"},"itemIcons":{"description":"Compact icon facts in the same order as `items`.","type":"array","items":{"$ref":"#/$defs/DropBrowseIconV1_1"}},"items":{"description":"Distinct item facts sorted by resolved key or unresolved name fact.","type":"array","items":{"$ref":"#/$defs/MonsterDropBrowseItemV1_1"}},"records":{"type":"object","additionalProperties":{"$ref":"#/$defs/MonsterDropBrowseRecordV1"}},"scope":{"$ref":"#/$defs/BuildScope"}},"additionalProperties":false,"required":["format","contractVersion","scope","items","itemIcons","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"]}]},"CompactMediaContentId":{"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"},"CoverageKey":{"type":"string","minLength":1,"pattern":"\\S"},"DropBrowseIconNonKnownV1_1":{"description":"Non-known Media icon states retained by compact drop browse revision 1.1.","oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]},"DropBrowseIconV1_1":{"description":"Compact icon fact aligned by index with `MonsterDropBrowseV1_1.items`.\n\nA string is a known, compact Media content ID. Object variants preserve the\noriginal explicit non-known catalog states without repeating a known-state\nwrapper around every digest.","anyOf":[{"$ref":"#/$defs/CompactMediaContentId"},{"$ref":"#/$defs/DropBrowseIconNonKnownV1_1"}]},"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_1":{"description":"Same-build item facts stored once per distinct item in drop browse revision 1.1.","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 schema46 = {"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":"Compact icon fact aligned by index with `MonsterDropBrowseV1_1.items`.\n\nA string is a known, compact Media content ID. Object variants preserve the\noriginal explicit non-known catalog states without repeating a known-state\nwrapper around every digest.","anyOf":[{"$ref":"#/$defs/CompactMediaContentId"},{"$ref":"#/$defs/DropBrowseIconNonKnownV1_1"}]};const schema33 = {"type":"string","maxLength":43,"minLength":43,"pattern":"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"};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("^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$", "u");const schema34 = {"description":"Non-known Media icon states retained by compact drop browse revision 1.1.","oneOf":[{"type":"object","properties":{"state":{"type":"string","const":"unknown"}},"additionalProperties":false,"required":["state"]},{"type":"object","properties":{"coverageKey":{"$ref":"#/$defs/CoverageKey"},"state":{"type":"string","const":"absent"}},"additionalProperties":false,"required":["state","coverageKey"]},{"type":"object","properties":{"state":{"type":"string","const":"unsupported"}},"additionalProperties":false,"required":["state"]}]};const schema35 = {"type":"string","minLength":1,"pattern":"\\S"};const pattern5 = new RegExp("\\S", "u");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.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++;}for(const key0 in data){if(!(key0 === "state")){const err1 = {instancePath,schemaPath:"#/oneOf/0/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}}if(data.state !== undefined){let data0 = data.state;if(typeof data0 !== "string"){const err2 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}if("unknown" !== data0){const err3 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/0/properties/state/const",keyword:"const",params:{allowedValue: "unknown"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}}}else {const err4 = {instancePath,schemaPath:"#/oneOf/0/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}var _valid0 = _errs1 === errors;if(_valid0){valid0 = true;passing0 = 0;var props0 = true;}const _errs6 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err5 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}if(data.coverageKey === undefined){const err6 = {instancePath,schemaPath:"#/oneOf/1/required",keyword:"required",params:{missingProperty: "coverageKey"},message:"must have required property '"+"coverageKey"+"'"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}for(const key1 in data){if(!((key1 === "coverageKey") || (key1 === "state"))){const err7 = {instancePath,schemaPath:"#/oneOf/1/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key1},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}}if(data.coverageKey !== undefined){let data1 = data.coverageKey;if(typeof data1 === "string"){if(func1(data1) < 1){const err8 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/minLength",keyword:"minLength",params:{limit: 1},message:"must NOT have fewer than 1 characters"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}if(!pattern5.test(data1)){const err9 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/pattern",keyword:"pattern",params:{pattern: "\\S"},message:"must match pattern \""+"\\S"+"\""};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}}else {const err10 = {instancePath:instancePath+"/coverageKey",schemaPath:"#/$defs/CoverageKey/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err10];}else {vErrors.push(err10);}errors++;}}if(data.state !== undefined){let data2 = data.state;if(typeof data2 !== "string"){const err11 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}if("absent" !== data2){const err12 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/1/properties/state/const",keyword:"const",params:{allowedValue: "absent"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}}else {const err13 = {instancePath,schemaPath:"#/oneOf/1/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}var _valid0 = _errs6 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 1];}else {if(_valid0){valid0 = true;passing0 = 1;if(props0 !== true){props0 = true;}}const _errs14 = errors;if(data && typeof data == "object" && !Array.isArray(data)){if(data.state === undefined){const err14 = {instancePath,schemaPath:"#/oneOf/2/required",keyword:"required",params:{missingProperty: "state"},message:"must have required property '"+"state"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}for(const key2 in data){if(!(key2 === "state")){const err15 = {instancePath,schemaPath:"#/oneOf/2/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key2},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}}if(data.state !== undefined){let data3 = data.state;if(typeof data3 !== "string"){const err16 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err16];}else {vErrors.push(err16);}errors++;}if("unsupported" !== data3){const err17 = {instancePath:instancePath+"/state",schemaPath:"#/oneOf/2/properties/state/const",keyword:"const",params:{allowedValue: "unsupported"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath,schemaPath:"#/oneOf/2/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}var _valid0 = _errs14 === errors;if(_valid0 && valid0){valid0 = false;passing0 = [passing0, 2];}else {if(_valid0){valid0 = true;passing0 = 2;if(props0 !== true){props0 = true;}}}}if(!valid0){const err19 = {instancePath,schemaPath:"#/oneOf",keyword:"oneOf",params:{passingSchemas: passing0},message:"must match exactly one schema in oneOf"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}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};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;}const _errs0 = errors;let valid0 = false;const _errs1 = errors;if(typeof data === "string"){if(func1(data) > 43){const err0 = {instancePath,schemaPath:"#/$defs/CompactMediaContentId/maxLength",keyword:"maxLength",params:{limit: 43},message:"must NOT have more than 43 characters"};if(vErrors === null){vErrors = [err0];}else {vErrors.push(err0);}errors++;}if(func1(data) < 43){const err1 = {instancePath,schemaPath:"#/$defs/CompactMediaContentId/minLength",keyword:"minLength",params:{limit: 43},message:"must NOT have fewer than 43 characters"};if(vErrors === null){vErrors = [err1];}else {vErrors.push(err1);}errors++;}if(!pattern4.test(data)){const err2 = {instancePath,schemaPath:"#/$defs/CompactMediaContentId/pattern",keyword:"pattern",params:{pattern: "^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"},message:"must match pattern \""+"^[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$"+"\""};if(vErrors === null){vErrors = [err2];}else {vErrors.push(err2);}errors++;}}else {const err3 = {instancePath,schemaPath:"#/$defs/CompactMediaContentId/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err3];}else {vErrors.push(err3);}errors++;}var _valid0 = _errs1 === errors;valid0 = valid0 || _valid0;const _errs4 = errors;if(!(validate22(data, {instancePath,parentData,parentDataProperty,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate22.errors : vErrors.concat(validate22.errors);errors = vErrors.length;}else {var props0 = validate22.evaluated.props;}var _valid0 = _errs4 === errors;valid0 = valid0 || _valid0;if(!valid0){const err4 = {instancePath,schemaPath:"#/anyOf",keyword:"anyOf",params:{},message:"must match a schema in anyOf"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}else {errors = _errs0;if(vErrors !== null){if(_errs0){vErrors.length = _errs0;}else {vErrors = null;}}}validate21.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate21.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema36 = {"description":"Same-build item facts stored once per distinct item in drop browse revision 1.1.","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 schema37 = {"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 schema38 = {"description":"Canonical non-equipment Item class.","type":"string","enum":["consume","etc","setup","cash","pet"]};function validate26(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate26.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: schema38.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;}}}validate26.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate26.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema39 = {"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"]}]};function validate28(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate28.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(!pattern5.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;}}}validate28.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate28.evaluated = {"dynamicProps":true,"dynamicItems":false};const schema41 = {"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 schema42 = {"description":"Projection state for a public reference.","type":"string","enum":["resolved","unresolved","ambiguous","unknown","absent","unsupported"]};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;}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: schema41.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: schema42.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++;}validate31.errors = vErrors;return errors === 0;}validate31.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};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;}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(!(validate26(data.category, {instancePath:instancePath+"/category",parentData:data,parentDataProperty:"category",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate26.errors : vErrors.concat(validate26.errors);errors = vErrors.length;}}if(data.itemClass !== undefined){if(!(validate28(data.itemClass, {instancePath:instancePath+"/itemClass",parentData:data,parentDataProperty:"itemClass",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data.itemName !== undefined){if(!(validate28(data.itemName, {instancePath:instancePath+"/itemName",parentData:data,parentDataProperty:"itemName",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate28.errors : vErrors.concat(validate28.errors);errors = vErrors.length;}}if(data.itemRef !== undefined){if(!(validate31(data.itemRef, {instancePath:instancePath+"/itemRef",parentData:data,parentDataProperty:"itemRef",rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate31.errors : vErrors.concat(validate31.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++;}validate25.errors = vErrors;return errors === 0;}validate25.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};const schema43 = {"description":"Drop entries grouped under one Monster key.","type":"object","properties":{"entries":{"type":"array","items":{"$ref":"#/$defs/MonsterDropBrowseEntryV1"}}},"additionalProperties":false,"required":["entries"]};const schema44 = {"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 schema45 = {"description":"Confidence in a historical assertion as evidence about a target build.","type":"string","enum":["maybe"]};function validate35(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate35.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: schema45.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;}}}validate35.errors = vErrors;evaluated0.props = props0;return errors === 0;}validate35.evaluated = {"dynamicProps":true,"dynamicItems":false};function validate34(data, {instancePath="", parentData, parentDataProperty, rootData=data, dynamicAnchors={}}={}){let vErrors = null;let errors = 0;const evaluated0 = validate34.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(!(validate35(data0[i0], {instancePath:instancePath+"/entries/" + i0,parentData:data0,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate35.errors : vErrors.concat(validate35.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++;}validate34.errors = vErrors;return errors === 0;}validate34.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.itemIcons === undefined){const err4 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "itemIcons"},message:"must have required property '"+"itemIcons"+"'"};if(vErrors === null){vErrors = [err4];}else {vErrors.push(err4);}errors++;}if(data.records === undefined){const err5 = {instancePath,schemaPath:"#/required",keyword:"required",params:{missingProperty: "records"},message:"must have required property '"+"records"+"'"};if(vErrors === null){vErrors = [err5];}else {vErrors.push(err5);}errors++;}for(const key0 in data){if(!((((((key0 === "contractVersion") || (key0 === "format")) || (key0 === "itemIcons")) || (key0 === "items")) || (key0 === "records")) || (key0 === "scope"))){const err6 = {instancePath,schemaPath:"#/additionalProperties",keyword:"additionalProperties",params:{additionalProperty: key0},message:"must NOT have additional properties"};if(vErrors === null){vErrors = [err6];}else {vErrors.push(err6);}errors++;}}if(data.contractVersion !== undefined){let data0 = data.contractVersion;if(typeof data0 !== "string"){const err7 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err7];}else {vErrors.push(err7);}errors++;}if("1.1" !== data0){const err8 = {instancePath:instancePath+"/contractVersion",schemaPath:"#/properties/contractVersion/const",keyword:"const",params:{allowedValue: "1.1"},message:"must be equal to constant"};if(vErrors === null){vErrors = [err8];}else {vErrors.push(err8);}errors++;}}if(data.format !== undefined){let data1 = data.format;if(typeof data1 !== "string"){const err9 = {instancePath:instancePath+"/format",schemaPath:"#/properties/format/type",keyword:"type",params:{type: "string"},message:"must be string"};if(vErrors === null){vErrors = [err9];}else {vErrors.push(err9);}errors++;}if("mapletip.monster-drop-browse" !== data1){const err10 = {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 = [err10];}else {vErrors.push(err10);}errors++;}}if(data.itemIcons !== undefined){let data2 = data.itemIcons;if(Array.isArray(data2)){const len0 = data2.length;for(let i0=0; i0<len0; i0++){if(!(validate21(data2[i0], {instancePath:instancePath+"/itemIcons/" + i0,parentData:data2,parentDataProperty:i0,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate21.errors : vErrors.concat(validate21.errors);errors = vErrors.length;}}}else {const err11 = {instancePath:instancePath+"/itemIcons",schemaPath:"#/properties/itemIcons/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err11];}else {vErrors.push(err11);}errors++;}}if(data.items !== undefined){let data4 = data.items;if(Array.isArray(data4)){const len1 = data4.length;for(let i1=0; i1<len1; i1++){if(!(validate25(data4[i1], {instancePath:instancePath+"/items/" + i1,parentData:data4,parentDataProperty:i1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate25.errors : vErrors.concat(validate25.errors);errors = vErrors.length;}}}else {const err12 = {instancePath:instancePath+"/items",schemaPath:"#/properties/items/type",keyword:"type",params:{type: "array"},message:"must be array"};if(vErrors === null){vErrors = [err12];}else {vErrors.push(err12);}errors++;}}if(data.records !== undefined){let data6 = data.records;if(data6 && typeof data6 == "object" && !Array.isArray(data6)){for(const key1 in data6){if(!(validate34(data6[key1], {instancePath:instancePath+"/records/" + key1.replace(/~/g, "~0").replace(/\//g, "~1"),parentData:data6,parentDataProperty:key1,rootData,dynamicAnchors}))){vErrors = vErrors === null ? validate34.errors : vErrors.concat(validate34.errors);errors = vErrors.length;}}}else {const err13 = {instancePath:instancePath+"/records",schemaPath:"#/properties/records/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err13];}else {vErrors.push(err13);}errors++;}}if(data.scope !== undefined){let data8 = data.scope;if(data8 && typeof data8 == "object" && !Array.isArray(data8)){if(data8.family_id === undefined){const err14 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "family_id"},message:"must have required property '"+"family_id"+"'"};if(vErrors === null){vErrors = [err14];}else {vErrors.push(err14);}errors++;}if(data8.build_id === undefined){const err15 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/required",keyword:"required",params:{missingProperty: "build_id"},message:"must have required property '"+"build_id"+"'"};if(vErrors === null){vErrors = [err15];}else {vErrors.push(err15);}errors++;}if(data8.build_id !== undefined){if(typeof data8.build_id !== "string"){const err16 = {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 = [err16];}else {vErrors.push(err16);}errors++;}}if(data8.family_id !== undefined){if(typeof data8.family_id !== "string"){const err17 = {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 = [err17];}else {vErrors.push(err17);}errors++;}}}else {const err18 = {instancePath:instancePath+"/scope",schemaPath:"#/$defs/BuildScope/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err18];}else {vErrors.push(err18);}errors++;}}}else {const err19 = {instancePath,schemaPath:"#/type",keyword:"type",params:{type: "object"},message:"must be object"};if(vErrors === null){vErrors = [err19];}else {vErrors.push(err19);}errors++;}validate20.errors = vErrors;return errors === 0;}validate20.evaluated = {"props":true,"dynamicProps":false,"dynamicItems":false};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mapletip/data",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Verified, immutable MapleTip public-data client for Node and browsers",
5
5
  "license": "UNLICENSED",
6
6
  "packageManager": "pnpm@11.18.0",
@@ -124,6 +124,8 @@
124
124
  "generated/monster-catalog-2-2.validator.js",
125
125
  "generated/monster-catalog-2-3.d.ts",
126
126
  "generated/monster-catalog-2-3.validator.js",
127
+ "generated/monster-catalog-2-4.d.ts",
128
+ "generated/monster-catalog-2-4.validator.js",
127
129
  "generated/monster-catalog-2.d.ts",
128
130
  "generated/monster-catalog-2.validator.js",
129
131
  "generated/monster-catalog.d.ts",
@@ -136,6 +138,8 @@
136
138
  "generated/monster-detail.validator.js",
137
139
  "generated/monster-drop-browse.d.ts",
138
140
  "generated/monster-drop-browse.validator.js",
141
+ "generated/monster-drop-browse-1-1.d.ts",
142
+ "generated/monster-drop-browse-1-1.validator.js",
139
143
  "generated/monster-evidence-pack-2.d.ts",
140
144
  "generated/monster-evidence-pack-2.validator.js",
141
145
  "generated/monster-evidence-pack.d.ts",
@@ -178,7 +182,7 @@
178
182
  "build": "tsc -p tsconfig.json --noEmit false",
179
183
  "generate": "node tools/generate-contracts.mjs",
180
184
  "drift": "node tools/generate-contracts.mjs --check",
181
- "test": "pnpm run build && pnpm exec tsc --strict --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck tools/map-geography-example.ts && node --test tools/test-fixtures.mjs tools/test-browser-consumption.mjs tools/expectations.test.mjs tools/historical-attribution.test.mjs tools/test-static-client.mjs tools/test-map-geography.mjs tools/test-item-equipment-sdk.mjs tools/test-monster-sprites.mjs tools/test-monster-browse.mjs tools/test-contract-2.mjs tools/test-quest-auxiliary.mjs tools/developer-loop.test.mjs tools/test-package-contents.mjs tools/test-package-consumer.mjs",
185
+ "test": "pnpm run build && pnpm exec tsc --strict --noEmit --target ES2022 --module NodeNext --moduleResolution NodeNext --skipLibCheck tools/map-geography-example.ts tools/readme-monster-examples.ts && node --test tools/test-fixtures.mjs tools/test-browser-consumption.mjs tools/expectations.test.mjs tools/historical-attribution.test.mjs tools/test-static-client.mjs tools/test-map-geography.mjs tools/test-item-equipment-sdk.mjs tools/test-monster-sprites.mjs tools/test-monster-browse.mjs tools/test-contract-2.mjs tools/test-quest-auxiliary.mjs tools/developer-loop.test.mjs tools/test-package-contents.mjs tools/test-package-consumer.mjs",
182
186
  "test:package": "node tools/test-package-contents.mjs && node tools/test-package-consumer.mjs",
183
187
  "developer-loop": "node tools/developer-loop.mjs",
184
188
  "time-developer-loop": "node tools/time-developer-loop.mjs",