in progress

This commit is contained in:
2023-04-27 06:17:20 +02:00
parent 0c74da3b20
commit a1fa43e2bd
279 changed files with 1706 additions and 95255 deletions

97
nationchains/schema/pagans.json Executable file → Normal file
View File

@@ -1,86 +1,13 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "nationchains/schema/pagans",
"title":"Pagan definition",
"description": "A pagan is an uuid to manage identity by deliver a way to its owner to proof he owns from a privatekey in the socialworld of apXtrib and manage access keys deliver by druid or mayor to interact physical ressource (CRUD on it).",
"type": "objects",
"properties":{
"paganId":{
"description": "|Pagans|paganiddesc",
"apxdesclong": "|Pagans|paganiddesclong"
"apxinfo":"|Pagans|paganidinfo",
"type": "string",
"apxtype":"uuidv4"
},
"login":{
"description": "|Pagans|logindesc",
"type": "string",
"pattern":"^[a-z0-9]*$",
"apxinfo": "|Pagans|logininfo"
},
"password":{
"description": "|Pagans|pswdesc",
"type": "string"
},
"townId":{
"description":"",
"type":"string",
"$apxenumkey": "socialworld/objects/nations/searchindex/towns_townId_all.json"
},
"tribeId":{
"description":"",
"type":"string",
"$apxenumkey": "tribes/objects/tribes/searchindex/tribes_tribeId_all.json"
},
"publicKey":{
"description": "|Pagans|publickeydesc",
"type":"string",
"apxinfo": "|Pagans|publickeyinfo"
},
"biography":{
"description": "|Pagans|biographydesc",
"type":"string",
"pattern":"^.{O,150}$"
},
"imgavatar":{
"description": "|Pagans|imgavatardesc",
"apxinfo": "|Pagans|imgavatarinfo",
"type":"string",
"apxtype":"file"
},
"emailrecup":{
"description":"|Pagans|emaildesc",
"tpl": "input",
"type": "email",
"check": ["emailadress", "unique"],
},
"dtcreate":{
"description": "|Pagans|dtcreatedesc",
"type":"string",
"pattern":"^[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$",
"default": "moment(new Date()).format('YYYY-MM-DD')"
},"dtupdate": {
"description": "|Pagans|dtupdatedesc",
"type":"string",
"pattern":"^[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$",
"default": "moment(new Date()).format('YYYY-MM-DD')"
},"dtlastlogin" {
"description": "|Pagans|dtlastlogindesc",
"type":"string",
"pattern":"^[0-9]{4}-(0?[1-9]|1[012])-(0?[1-9]|[12][0-9]|3[01])$",
"default": "moment(new Date()).format('YYYY-MM-DD')"
},"accessrights": {
"description": "|Pagans|accessrightsdesc",
"type":"object",
"$ref":"socialworld/schema/accessright.json"
}
},
"required": ["paganId","login","townId", "tribeId"],
"apxprimarykey": "paganId",
"apxunique":["login"],
"apxsearchindex": [
{ "key": "login", "value": "paganId" },
{ "key": "email", "value": "paganId" },
{ "key": "token", "value": "paganId" }
]
}
"$id":"https://smatchit.io/schema/pagan",
"$comment":"To create account bin apxtrib",
"type":"object",
"properties":{
"publickey": {"type":"string", "format":"pgpAE256"},
"alias": {"type":"string", "minLength":5, "pattern":"^[a-z0-9]*$" }
}
"required":["publickey","alias"]
"apxprimarykey":[alias],
"apxsecondarykey":[publickey],
"apxsearchindex":[{"key":"alias","val":publickey},{"key":"publickey","val":"alias"}]
}

47
nationchains/schema/person.json Executable file
View File

@@ -0,0 +1,47 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "nationchains/schema/person",
"title": "Person minimum definition to link a person to a pagan identity",
"description": "A person is a human with a apxtrib identity (Public Private Key. Information stored (not cipher) for a person are only visible from the town's Mayor and the tribe's Druid. You need at least trus 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.",
"type": "objects",
"properties": {
"alias": {
"type": "string",
"minLength": 5,
"pattern": "^[a-z0-9]*$"
},
"dt_create": {
"type": "string",
"format": "datetime",
"default": "dayjs.now()"
},
"dt_update": { "type": "string", "format": "datetime" },
"dt_lastlogin": { "type": "string", "format": "datetime" },
"dt_close": { "type": "string", "format": "datetime" },
"recovery": {
"type": "object",
"$ref": {
"email": { "type": "string", "format": "email" },
"privatekey": { "type": "string", "format": "eccCorve25519armored" }
}
},
"biography": {
"type": "string",
"pattern": "^.{O,150}$"
},
"imgavatar": {
"type": "string",
},
"accessrights": {
"type": "object",
"$ref": "nationchains/schema/accessright.json"
}
},
"required": ["alias", "accessright"],
"apxprimarykey": "alias",
"apxunique": [""],
"apxsearchindex": [
{ "key": "alias", "value": [] },
{ "key": "recovery.email", "value": "alias" }
]
}

View File

@@ -5,41 +5,33 @@
"description": "A tribe belonging to a town",
"type": "object",
"properties": {
"townId": {
"description": "|Towns|townnamedesc",
"desclong": "|Townss|townnamedesclong",
"info": "|Towns|townnameinfo",
"type": "string",
"tribeId":{
"type":"string",
"pattern":"^[a-z0-9]*$"
},
"nationId": {
"description": "|Towns|nationdesc",
"desclong": "|Townss|nationdesclong",
"townId": {
"type": "string",
"$apxenumkey": "socialworld/objects/nations/searchindex/nations_uuid_uuid.json"
"$ref": "nationchains/towns/idx/towns_uuid_uuid.json"
},
"nationId": {
"type": "string",
"$ref": "nationchains/nations/idx/nations_uuid_uuid.json"
},
"status": {
"desc": "|Towns|statusdesc",
"default": "active",
"default": "unchain",
"type": "string",
"$apxenumkey": "data",
"data": {
"chain": { "desc": "|Towns|statuschain" },
"tochain": { "desc": "|Towns|statustosync" },
"unchain": { "desc": "|Towns|statusunchain" }
}
"enum": ["chain","tochain","unchain"]
},
"url": {
"desc": "|Towns|urldesc",
"type": "string",
"apxtype":"url"
"dns": {
"type": "array",
"items":{"type":"string", "uniqueItems":true}
}
},
"required": ["townId", "status", "nationId", "url"],
"apxprimarykey": "townId",
"required": ["townId", "status", "nationId", "dns"],
"apxprimarykey": ["tribeId"],
"apxsearchindex": [
{ "key": "status", "value": "townId" },
{ "key": "nationId", "value": "townId" },
{ "key": "townId", "value": [] }
{ "key": "status", "value": "tribeId" },
{ "key": "tribeId", "value": [] }
]
}