{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"/api/ai/schema/analysis.json","title":"cek-qris AI lookup analysis","type":"object","additionalProperties":false,"required":["ok","schemaVersion","analysis","community","interpretation"],"properties":{"ok":{"const":true},"schemaVersion":{"const":"1.0"},"analysis":{"type":"object","additionalProperties":false,"required":["fields","crc","errors","warnings","nss","transaction"],"properties":{"fields":{"type":"array","items":{"$ref":"#/$defs/Field"}},"crc":{"type":"object","additionalProperties":false,"required":["status","expected","actual"],"properties":{"status":{"type":"string","enum":["valid","invalid","missing","not-applicable"]},"expected":{"type":["string","null"]},"actual":{"type":["string","null"]}}},"errors":{"type":"array","items":{"type":"string"}},"warnings":{"type":"array","items":{"type":"string"}},"nss":{"oneOf":[{"$ref":"#/$defs/NssMatch"},{"type":"null"}]},"transaction":{"$ref":"#/$defs/Transaction"}}},"community":{"$ref":"#/$defs/CommunityReport"},"interpretation":{"type":"object","additionalProperties":false,"required":["merchantLegitimacyVerified","paymentSafetyVerified"],"properties":{"merchantLegitimacyVerified":{"const":false},"paymentSafetyVerified":{"const":false}}}},"$defs":{"Field":{"type":"object","additionalProperties":false,"required":["tag","label","length","value","start","valueStart","valueEnd"],"properties":{"tag":{"type":"string","pattern":"^\\d{2}$"},"label":{"type":"string"},"length":{"type":"integer","minimum":0},"value":{"type":"string"},"start":{"type":"integer","minimum":0},"valueStart":{"type":"integer","minimum":0},"valueEnd":{"type":"integer","minimum":0},"error":{"type":"string"},"children":{"type":"array","items":{"$ref":"#/$defs/Field"}}}},"NssMatch":{"type":"object","additionalProperties":false,"required":["code","known","name","product"],"properties":{"code":{"type":"string","pattern":"^\\d{8}$"},"known":{"type":"boolean"},"name":{"type":["string","null"]},"product":{"type":["string","null"]}}},"Transaction":{"type":"object","additionalProperties":false,"required":["amount","currency","countryCode","merchantName","merchantCity","postalCode","referenceLabel","billNumber"],"properties":{"amount":{"type":["string","null"]},"currency":{"type":["string","null"]},"countryCode":{"type":["string","null"]},"merchantName":{"type":["string","null"]},"merchantCity":{"type":["string","null"]},"postalCode":{"type":["string","null"]},"referenceLabel":{"type":["string","null"]},"billNumber":{"type":["string","null"]}}},"CommunityReport":{"type":"object","additionalProperties":false,"required":["status","badVotes","goodVotes","totalVotes","totalLikes","commentsTruncated","comments"],"properties":{"status":{"type":"string","enum":["available","unavailable"]},"badVotes":{"type":"integer","minimum":0},"goodVotes":{"type":"integer","minimum":0},"totalVotes":{"type":"integer","minimum":0},"totalLikes":{"type":"integer","minimum":0,"description":"Sum of likes for the returned comment window; not a global total when commentsTruncated is true."},"commentsTruncated":{"type":"boolean"},"comments":{"type":"array","maxItems":100,"items":{"type":"object","additionalProperties":false,"required":["id","message","likes","createdAt"],"properties":{"id":{"type":"integer","minimum":0},"message":{"type":"string"},"likes":{"type":"integer","minimum":0},"createdAt":{"type":["string","null"],"format":"date-time"}}}}}}}}