{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "/schema/person", "title": "Person minimum definition to link a person to a pagan identity", "description": "A person is a human with a apxtrib identity (alias = Public Private Key) that accept to be part of a tribe (a person is store inside a tribe). Information stored for a person are only visible from the town's Mayor and the tribe's Druid. You need at least trust the druid that trust the mayor (for sensitive data Mayor and Druid can be the same apx Identity.) Only a pagan that have the privateKey can read cipher data. The purpose of this schema is to link a person to a tribe and manage basic activities, profil for specific purpose will be a tribe object that can be add additionalProperties of this is set at true.", "type": "object", "properties": { "alias": { "title": "alias", "description": "A unique string identifying a unique public key", "type": "string", "minLength": 5, "pattern": "^[a-z0-9]*$" }, "owner": { "title": "Owner of this person", "description": "For accessright purpose this is always equal as alias", "type": "string", "format": "Alias" }, "dt_create": { "type": "string", "format": "date-time", "default": "dayjs.now()" }, "dt_update": { "type": "string", "format": "date-time" }, "dt_lastlogin": { "title": "Last time login", "description": "Last time this person authentify as alias access to this tribe", "type": "string", "format": "date-time" }, "dt_close": { "title": "Date of leaving tribe", "description": "Date from when this alias is ban of tribe by druid or want to leave. A pocess of data cleaning has to be run depending of Tribe's rules.", "type": "string", "format": "date-time" }, "recoveryauth": { "title": "Store numeric identity to recover it by email", "description": "This object store numeric identity alias with an email mainly used at Person level to recover by email a private and passphrase key associate to alias", "type": "object", "$ref": "#/definitions/recoveryauth" }, "firstname": { "title": "A firstname", "description": "This will be use to present yourself", "type": "string" }, "lastname": { "title": "A lastname", "description": "This will be use to present yourself", "type": "string" }, "dt_birth": { "title": "Your birthdate", "description": "Date of birth you want to communicate", "type": "string", "format": "date" }, "pronom": { "title": "Your pronom", "description": "The way you want people communicate with you", "type": "string", "enum": ["M", "MME", "OTHER"] }, "emailcom": { "title": "email use to communicate with you", "description": "email used by tribe to communicate with you, depending of your profil you can also define other mail to interact with other person", "type": "string", "format": "email" }, "biography": { "title":"Your bio or few words to define yoursel", "description":"Use this to share your values, this will be public to all of tribe's members and link to your person", "type": "string", "pattern": "^.{O,150}$" }, "imgavatar": { "title":"A picture of your person or personnality", "description":"This picture will be public to all tribe's member", "type": "url" }, "accessrights": { "title": "Accessright per Object or per Object.key belonging to a tribe", "description": "A Person can create read update delete an object (CRUD), if Own means if owner = alias of user requested some CRUD action to owner then he can act on this object or object.key List of Object with CRUDO value like {Person:'RUDO','Person.recoveryauth':'O',...}. To simplify some profil can be define admin, user, recruiter, seeker, and get a standard accessright object", "type": "object", "$ref": "#/definitions/accessright" } }, "definitions": { "recoveryauth": { "type": "object", "properties": { "email": { "type": "string", "format": "email" }, "alias": { "type": "string", "format": "Pagan" }, "privatekey": { "type": "string", "format": "eccCorve25519armored" } } }, "accessright":{ "type":"object", "properties":{ "type":"object", "properties":{ "objkey": {"type":"sring","format":"CRUDO"} } } } }, "required": ["alias", "accessright"], "additionalProperties": true, "apxprimarykey": "alias", "apxunique": [""], "apxsearchindex": [ { "key": "alias", "value": [] }, { "key": "recovery.email", "value": "alias" } ] }