78 lines
3.1 KiB
JSON
78 lines
3.1 KiB
JSON
{
|
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
"$id": "https://chimera.local/schemas/trophy-local-inventory.schema.json",
|
|
"title": "Chimera read-only local PS5 trophy inventory",
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["schemaVersion", "provider", "profile", "coverage", "observedAt", "titles"],
|
|
"properties": {
|
|
"schemaVersion": { "const": 1 },
|
|
"provider": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["id", "version", "firmware", "capabilities"],
|
|
"properties": {
|
|
"id": { "type": "string", "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$" },
|
|
"version": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
"firmware": { "type": "string", "minLength": 1, "maxLength": 32 },
|
|
"capabilities": {
|
|
"type": "array",
|
|
"uniqueItems": true,
|
|
"items": { "enum": ["profile-identity", "list-title-sets", "list-earned-trophies", "earned-timestamps"] }
|
|
}
|
|
}
|
|
},
|
|
"profile": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["profileId", "localUserId"],
|
|
"properties": {
|
|
"profileId": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
"localUserId": { "type": "string", "minLength": 1, "maxLength": 64 },
|
|
"accountId": { "type": ["string", "null"], "maxLength": 64 }
|
|
}
|
|
},
|
|
"coverage": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["status", "completedScopes", "failedScopes"],
|
|
"properties": {
|
|
"status": { "enum": ["complete", "partial", "inaccessible"] },
|
|
"completedScopes": { "type": "array", "maxItems": 256, "items": { "type": "string", "maxLength": 128 } },
|
|
"failedScopes": { "type": "array", "maxItems": 256, "items": { "type": "string", "maxLength": 128 } }
|
|
}
|
|
},
|
|
"observedAt": { "type": "string", "format": "date-time" },
|
|
"titles": {
|
|
"type": "array",
|
|
"maxItems": 1000,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["npCommunicationId", "platform", "service", "trophies"],
|
|
"properties": {
|
|
"npCommunicationId": { "type": "string", "maxLength": 64 },
|
|
"titleId": { "type": "string", "maxLength": 10 },
|
|
"platform": { "enum": ["PS4", "PS5"] },
|
|
"service": { "enum": ["trophy", "trophy2"] },
|
|
"trophies": {
|
|
"type": "array",
|
|
"maxItems": 5000,
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"required": ["groupId", "trophyId", "earned"],
|
|
"properties": {
|
|
"groupId": { "type": "string", "maxLength": 64 },
|
|
"trophyId": { "type": "integer", "minimum": 0, "maximum": 99999 },
|
|
"earned": { "type": "boolean" },
|
|
"earnedDateTime": { "type": ["string", "null"], "format": "date-time" },
|
|
"definitionHash": { "type": ["string", "null"], "pattern": "^[a-f0-9]{64}$" }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |