cic-stack/apps/cic-meta/tests/response.ts

80 lines
7.1 KiB
TypeScript
Raw Normal View History

2021-06-07 18:11:03 +02:00
const getResponse = {
name: 'cic',
version: '1',
ext: {
network: { name: 'pgp', version: '2' },
engine: { name: 'automerge', version: '0.14.1' }
},
payload: `["~#iL",[["~#iM",["ops",["^0",[["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","id","value","a51472cb4df63b199a4de01335b1b4d1bbee27ff4f03340aa1d592f26c6acfe2"]],["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","timestamp","value",1622711395]],["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","data","value","{\\n date_registered: Date.now(),\\n gender: 'other',\\n identities: {\\n evm: {\\n 'bloxberg:8996': [''],\\n 'oldchain:1': [''],\\n },\\n latitude: 0,\\n longitude: 0,\\n },\\n location: {\\n area_name: 'Kilifi',\\n },\\n products: [],\\n vcard: {\\n email: [\\n {\\n value: '',\\n },\\n ],\\n fn: [\\n {\\n value: 'Sarafu Contract',\\n },\\n ],\\n n: [\\n {\\n value: ['Sarafu', 'Contract'],\\n },\\n ],\\n tel: [\\n {\\n meta: {\\n TYP: [],\\n },\\n value: '',\\n },\\n ],\\n version: [\\n {\\n value: '3.0',\\n },\\n ],\\n },\\n},\\n"]]]],"actor","45832516-738b-421a-80c1-07cc39dcacca","seq",1,"deps",["^1",[]],"message","Initialization","undoable",false]],["^1",["ops",["^0",[["^1",["action","makeMap","obj","463f3982-eafb-47d5-9444-487d5baeef85"]],["^1",["action","set","obj","463f3982-eafb-47d5-9444-487d5baeef85","key","engine","value","pgp"]],["^1",["action","set","obj","463f3982-eafb-47d5-9444-487d5baeef85","key","algo","value","sha256"]],["^1",["action","set","obj","463f3982-eafb-47d5-9444-487d5baeef85","key","data","value","-----BEGIN PGP SIGNATURE-----\\r\\nVersion: OpenPGP.js v4.10.8\\r\\nComment: https://openpgpjs.org\\r\\n\\r\\nwsDzBAEBCgAGBQJguJxoACEJEO8m9GgjQ/aSFiEE8/r2aOgu9RJNUYe67yb0\\r\\naCND9pL6Twv8DijIfM6XBytcjOZDsqqsYWaupae8wdZa1nu8Em/wqT0jpZY6\\r\\n5i0vfkV1l/Lu7/TQRiGK7MTpX/cd9nn4yFu47Yn1BE8I3ggLdz/Ga2Zma88O\\r\\n0mGrmiXmEegGIXecnvGGGdr8sb/r5uTpfzMqzA/xLuf2/MTr54ial5K7pISB\\r\\npOtY66C5HZJFBfo0lcwzM/oaNmxSiOq4MJ849vT4GNz7WE1Kj+3Er/d6b48D\\r\\npvUClwIlK1YMHP80XBrBfFmt1578TXrRBsHd6Z+KMNyp924I0WDhR5TUMSSq\\r\\nQYKwG+toZBNuKxfDJAPNPS5SwgirKsTSbuA1plRCplp13f+2A0bWC5X1L8CQ\\r\\n8AE7KGbes9O5kPfNToYRvKzYhz2mJBbTC00+kQr2wqMEBBMzmEIYERjRZ43F\\r\\nVFk2kKHmaR4V5uK9nFkpjtkdb4xh8nksoZl6wj+Rrsu/j98xDaUJIcYBD/B1\\r\\nuB/Xayw1Iv8ztDlpHgxzdarFEUsVGKcYIxXzCadI6xA7\\r\\n=rQnc\\r\\n-----END PGP SIGNATURE-----\\r\\n"]],["^1",["action","set","obj","463f3982-eafb-47d5-9444-487d5baeef85","key","digest","value","W10="]],["^1",["action","link","obj","00000000-0000-0000-0000-000000000000","key","signature","value","463f3982-eafb-47d5-9444-487d5baeef85"]]]],"actor","45832516-738b-421a-80c1-07cc39dcacca","seq",2,"deps",["^1",[]],"message","sign"]],["^1",["ops",["^0",[["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","id","value","a51472cb4df63b199a4de01335b1b4d1bbee27ff4f03340aa1d592f26c6acfe2"]],["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","timestamp","value",1622711463]],["^1",["action","set","obj","00000000-0000-0000-0000-000000000000","key","data","value","{\\n date_registered: Date.now(),\\n gender: 'other',\\n identities: {\\n evm: {\\n 'bloxberg:8996': [''],\\n 'oldchain:1': [''],\\n },\\n latitude: 0,\\n longitude: 0,\\n },\\n location: {\\n area_name: 'Kilifi',\\n },\\n products: [],\\n vcard: {\\n email: [\\n {\\n value: '',\\n },\\n ],\\n fn: [\\n {\\n value: 'Sarafu Contract',\\n },\\n ],\\n n: [\\n {\\n value: ['Sarafu', 'Contract'],\\n },\\n ],\\n tel: [\\n {\\n meta: {\\n TYP: [],\\n },\\n valu
};
const putResponse = {
status: 200,
statusText: 'OK, Metadata updated successfully!'
}
const notFoundResponse = {
status: 404,
statusText: 'Not Found'
}
const networkErrorResponse = {
code: 'ECONNREFUSED',
message: 'Could not connect to network'
}
const metaData = {
date_registered: Date.now(),
gender: 'other',
identities: {
evm: {
'bloxberg:8996': [''],
'oldchain:1': [''],
},
latitude: 0,
longitude: 0,
},
location: {
area_name: 'Kilifi',
},
products: [],
vcard: {
email: [
{
value: '',
},
],
fn: [
{
value: 'Sarafu Contract',
},
],
n: [
{
value: ['Sarafu', 'Contract'],
},
],
tel: [
{
meta: {
TYP: [],
},
value: '',
},
],
version: [
{
value: '3.0',
},
],
},
};
export {
getResponse,
metaData,
networkErrorResponse,
notFoundResponse,
putResponse
}