3acaee377b
* first pass of LUD-18 support * Various LUD-18 updates * don't cache the well-known response, since it includes randomly generated single use values * validate k1 from well-known response to pay URL * only keep k1's for 10 minutes if they go unused * fix validation logic to make auth object optional * Various LUD18 updates * move k1 cache to database * store payer data in invoice db table * show payer data in invoices on satistics page * show comments and payer data on invoice page * Show lud18 data in invoice notification * PayerData component for easier display of info in invoice, notification, wallet history * `payerData` -> `invoicePayerData` in fact schema * Merge prisma migrations * lint fixes * worker job to clear out unused lnurlp requests after 30 minutes * More linting * Move migration to older * WIP review * enhance lud-18 * refine notification ui --------- Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com> Co-authored-by: keyan <keyan.kousha+huumn@gmail.com>
109 lines
2.0 KiB
JavaScript
109 lines
2.0 KiB
JavaScript
import { gql } from '@apollo/client'
|
|
import { ITEM_FULL_FIELDS } from './items'
|
|
import { INVITE_FIELDS } from './invites'
|
|
|
|
export const HAS_NOTIFICATIONS = gql`{ hasNewNotes }`
|
|
|
|
export const NOTIFICATIONS = gql`
|
|
${ITEM_FULL_FIELDS}
|
|
${INVITE_FIELDS}
|
|
|
|
query Notifications($cursor: String, $inc: String) {
|
|
notifications(cursor: $cursor, inc: $inc) {
|
|
cursor
|
|
lastChecked
|
|
notifications {
|
|
__typename
|
|
... on Mention {
|
|
id
|
|
sortTime
|
|
mention
|
|
item {
|
|
...ItemFullFields
|
|
text
|
|
}
|
|
}
|
|
... on Votification {
|
|
id
|
|
sortTime
|
|
earnedSats
|
|
item {
|
|
...ItemFullFields
|
|
text
|
|
}
|
|
}
|
|
... on ForwardedVotification {
|
|
id
|
|
sortTime
|
|
earnedSats
|
|
item {
|
|
...ItemFullFields
|
|
text
|
|
}
|
|
}
|
|
... on Streak {
|
|
id
|
|
sortTime
|
|
days
|
|
}
|
|
... on Earn {
|
|
id
|
|
sortTime
|
|
minSortTime
|
|
earnedSats
|
|
sources {
|
|
posts
|
|
comments
|
|
tipPosts
|
|
tipComments
|
|
}
|
|
}
|
|
... on Referral {
|
|
id
|
|
sortTime
|
|
}
|
|
... on Reply {
|
|
id
|
|
sortTime
|
|
item {
|
|
...ItemFullFields
|
|
text
|
|
}
|
|
}
|
|
... on FollowActivity {
|
|
id
|
|
sortTime
|
|
item {
|
|
...ItemFullFields
|
|
text
|
|
}
|
|
}
|
|
... on Invitification {
|
|
id
|
|
sortTime
|
|
invite {
|
|
...InviteFields
|
|
}
|
|
}
|
|
... on JobChanged {
|
|
id
|
|
sortTime
|
|
item {
|
|
...ItemFields
|
|
}
|
|
}
|
|
... on InvoicePaid {
|
|
id
|
|
sortTime
|
|
earnedSats
|
|
invoice {
|
|
id
|
|
nostr
|
|
comment
|
|
lud18Data
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} `
|