adminapi/schema/persons.json

185 lines
5.9 KiB
JSON
Raw Normal View History

2024-11-10 23:33:30 +00:00
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "/schema/persons",
"title": "Person minimum definition to link a person to a pagan identity",
"description": "A person is a human with a apxtri 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",
"options": { "$ref": "adminapi/objects/pagans/idx/lst_alias" }
},
"owner": {
"title": "Owner of this person",
"description": "For accessright purpose this is always equal as alias",
"type": "string",
"options": { "$ref": "adminapi/objects/pagans/idx/lst_alias" }
},
"dt_create": {
"title": "Creation date",
"type": "string",
"format": "date-time"
},
"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_delete": {
"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"
},
"will": {
"title": "Will script after leaving tribe",
"description": "This will script will be apply on your data 30 days after your delete",
"type": "string"
},
"dt_birth": {
"title": "Your birthdate",
"description": "Date of birth you want to communicate",
"type": "string",
"format": "date"
},
"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"
},
"hobbies": {
"title": "My hobbies",
"type": "array",
"comment": "from a tree word combinaison /lg/hobbies_xx"
},
"biography": {
"title": "Your bio or few words to define yourself",
"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,1000}$"
},
"imgbase64_imgavatar": {
"title": "Temporary img to update or create",
"description": "image will be store in /objects/persons/{alias}_imgavatar.webp",
"sizeHW": [80, 80],
"type": "string",
"format": "imgbase64"
},
"imgavatar": {
"title": "A picture of your person or personnality",
"description": "This picture will be public to all tribe's member",
"type": "string",
"format": "uri"
},
"profils": {
"title": "Array of profil",
"description": "List of profil to get accessright on object",
"type": "array",
"items": {
"type": "string",
"options": { "$ref": "smatchit/objects/options/profil" }
}
}
},
"required": ["alias", "profils"],
"additionalProperties": true,
"apxref": [],
"apxid": "alias",
"apxuniquekey": ["alias"],
"apxidx": [
{
"name": "lst_alias",
"type": "array",
"keyval": "alias"
},
{
"name": "lst_profils",
"type": "array",
"keyval": "profils"
},
{
"name": "alias",
"type": "view",
"keyval": "alias",
"objkey": [
"alias",
"dt_create",
"dt_update",
"last_login",
"dt_birth",
"emailcom",
"hobbies",
"biography",
"imgavatar",
"profils"
],
"filter": ""
},
{
"name": "profils_alias",
"type": "distribution",
"keyval": "profils",
"filter": ""
},
{
"name": "emailcom_alias",
"type": "distribution",
"keyval": "emailcom",
"filter": ""
},
{
"name": "hobbies_alias",
"type": "distribution",
"keyval": "hobbies",
"filter": ""
}
],
"commentaccessrights": "only a pagans can create a persons by joining the tribe smatchit. An adminrecruiters can Read person and update only profil by adding value recruiters or interviewers, that will create for this alias a recruiters itm or interviewers itm, use /api/smatchit/profilmanagers/join/:profils/:recruiteralias",
"apxaccessrights": {
"owner": {
"D": [],
"R": [
"alias",
"owner",
"profils",
"dt_create",
"dt_update",
"dt_lastlogin",
"dt_birth",
"emailcom",
"hobbies",
"biography",
"imgavatar",
"profils"
],
"U": [
"dt_birth",
"emailcom",
"hobbies",
"biography",
"imgavatar",
"profils"
]
},
"pagans": {
"C": []
},
"mayors": {
"D": [],
"R": ["alias"]
},
"druids": {
"D": [],
"R": ["alias"]
}
}
}