mirror of
https://codeberg.org/keyoxide/doipjs.git
synced 2025-01-09 06:19:29 -07:00
Update service provider data structure
This commit is contained in:
parent
d2f03d9bde
commit
aaf9079de5
15 changed files with 42 additions and 30 deletions
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: `https://dev.to/${match[1]}`
|
||||
uri: `https://dev.to/${match[1]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['body_markdown'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `${match[2]}@${match[1]}`,
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['user', 'bio_raw'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: `https://${match[1]}`
|
||||
uri: `https://${match[1]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: utils.generateProxyURL('dns', match[1]),
|
||||
|
@ -67,7 +68,6 @@ const processURI = (uri, opts) => {
|
|||
path: ['records', 'txt'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null,
|
||||
customRequestHandler: customRequestHandler
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `@${match[2]}@${match[1]}`,
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['summary'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `${match[2]}@${match[1]}`,
|
||||
uri: `https://${match[1]}/${match[2]}`
|
||||
uri: `https://${match[1]}/${match[2]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['description'],
|
||||
relation: 'equals'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: `https://github.com/${match[1]}`
|
||||
uri: `https://github.com/${match[1]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['files', 'openpgp.md', 'content'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `${match[2]}@${match[1]}`,
|
||||
uri: `https://${match[1]}/${match[2]}`
|
||||
uri: `https://${match[1]}/${match[2]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -67,7 +68,6 @@ const processURI = (uri, opts) => {
|
|||
path: ['description'],
|
||||
relation: 'equals'
|
||||
},
|
||||
qr: null,
|
||||
customRequestHandler: customRequestHandler
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: `https://hacker-news.firebaseio.com/v0/user/${match[1]}.json`,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['about'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['statements', 'content'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: `https://lobste.rs/u/${match[1]}.json`,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['about'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `@${match[2]}@${match[1]}`,
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['attachment', 'value'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: match[1],
|
||||
uri: `https://www.reddit.com/user/${match[1]}`
|
||||
uri: `https://www.reddit.com/user/${match[1]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: ['data', 'children', 'data', 'selftext'],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `@${match[1]}`,
|
||||
uri: `https://twitter.com/${match[1]}`
|
||||
uri: `https://twitter.com/${match[1]}`,
|
||||
qr: null
|
||||
},
|
||||
proof: {
|
||||
uri: uri,
|
||||
|
@ -40,7 +41,7 @@ const processURI = (uri, opts) => {
|
|||
path: [],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: null
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@ const processURI = (uri, opts) => {
|
|||
},
|
||||
profile: {
|
||||
display: `${match[1]}@${match[2]}`,
|
||||
uri: uri
|
||||
uri: uri,
|
||||
qr: uri
|
||||
},
|
||||
proof: {
|
||||
uri: 'xmppVcardServerDomain' in opts
|
||||
|
@ -42,7 +43,7 @@ const processURI = (uri, opts) => {
|
|||
path: [],
|
||||
relation: 'contains'
|
||||
},
|
||||
qr: uri
|
||||
customRequestHandler: null
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -29,7 +29,8 @@ const pattern = {
|
|||
},
|
||||
profile: {
|
||||
display: _.isString,
|
||||
uri: _.isString
|
||||
uri: _.isString,
|
||||
qr: (x) => { return _.isString(x) || _.isNull(x) }
|
||||
},
|
||||
proof: {
|
||||
uri: (x) => { return _.isString(x) || _.isNull(x) },
|
||||
|
@ -43,7 +44,6 @@ const pattern = {
|
|||
path: _.isArray,
|
||||
relation: _.isString
|
||||
},
|
||||
qr: (x) => { return _.isString(x) || _.isNull(x) },
|
||||
customRequestHandler: (x) => { return _.isFunction(x) || _.isNull(x) || _.isUndefined(x) }
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue