2021-08-17 18:07:52 -05:00
|
|
|
import { gql } from '@apollo/client'
|
2024-07-01 12:02:29 -05:00
|
|
|
import { ITEM_FULL_FIELDS, POLL_FIELDS } from './items'
|
2022-01-19 15:02:38 -06:00
|
|
|
import { INVITE_FIELDS } from './invites'
|
2024-01-02 20:05:49 -06:00
|
|
|
import { SUB_FIELDS } from './subs'
|
2024-07-01 12:02:29 -05:00
|
|
|
import { INVOICE_FIELDS } from './wallet'
|
2021-08-17 13:15:24 -05:00
|
|
|
|
2023-07-23 10:08:43 -05:00
|
|
|
export const HAS_NOTIFICATIONS = gql`{ hasNewNotes }`
|
|
|
|
|
2024-07-01 12:02:29 -05:00
|
|
|
export const INVOICIFICATION = gql`
|
2023-02-03 18:08:08 -06:00
|
|
|
${ITEM_FULL_FIELDS}
|
2024-07-01 12:02:29 -05:00
|
|
|
${POLL_FIELDS}
|
|
|
|
${INVOICE_FIELDS}
|
|
|
|
fragment InvoicificationFields on Invoicification {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
invoice {
|
|
|
|
...InvoiceFields
|
|
|
|
item {
|
|
|
|
...ItemFullFields
|
|
|
|
...PollFields
|
|
|
|
}
|
|
|
|
itemAct {
|
|
|
|
id
|
|
|
|
act
|
|
|
|
invoice {
|
|
|
|
id
|
|
|
|
actionState
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}`
|
|
|
|
|
|
|
|
export const NOTIFICATIONS = gql`
|
|
|
|
${INVOICIFICATION}
|
2022-01-19 15:02:38 -06:00
|
|
|
${INVITE_FIELDS}
|
2024-01-02 20:05:49 -06:00
|
|
|
${SUB_FIELDS}
|
2021-08-17 13:15:24 -05:00
|
|
|
|
2022-04-21 12:48:27 -05:00
|
|
|
query Notifications($cursor: String, $inc: String) {
|
|
|
|
notifications(cursor: $cursor, inc: $inc) {
|
2021-08-17 13:15:24 -05:00
|
|
|
cursor
|
2021-08-19 19:13:32 -05:00
|
|
|
lastChecked
|
2021-08-17 13:15:24 -05:00
|
|
|
notifications {
|
|
|
|
__typename
|
2021-08-18 18:00:54 -05:00
|
|
|
... on Mention {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2021-08-19 19:13:32 -05:00
|
|
|
sortTime
|
2021-08-18 18:00:54 -05:00
|
|
|
mention
|
|
|
|
item {
|
2023-02-03 18:08:08 -06:00
|
|
|
...ItemFullFields
|
2021-08-18 18:00:54 -05:00
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2024-06-03 12:12:42 -05:00
|
|
|
... on ItemMention {
|
|
|
|
id
|
|
|
|
sortTime
|
2024-07-01 12:02:29 -05:00
|
|
|
item {
|
2024-06-03 12:12:42 -05:00
|
|
|
...ItemFullFields
|
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2021-08-17 13:15:24 -05:00
|
|
|
... on Votification {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2021-08-19 19:13:32 -05:00
|
|
|
sortTime
|
2021-08-17 13:15:24 -05:00
|
|
|
earnedSats
|
|
|
|
item {
|
2023-02-03 18:08:08 -06:00
|
|
|
...ItemFullFields
|
2021-08-17 13:15:24 -05:00
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2023-11-21 17:32:22 -06:00
|
|
|
... on Revenue {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
earnedSats
|
|
|
|
subName
|
|
|
|
}
|
2023-09-12 11:31:46 -04:00
|
|
|
... on ForwardedVotification {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
earnedSats
|
|
|
|
item {
|
|
|
|
...ItemFullFields
|
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2023-02-01 08:44:35 -06:00
|
|
|
... on Streak {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
days
|
|
|
|
}
|
2022-07-05 15:18:59 -05:00
|
|
|
... on Earn {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2022-07-05 15:18:59 -05:00
|
|
|
sortTime
|
2023-08-29 19:13:21 -05:00
|
|
|
minSortTime
|
2022-07-05 15:18:59 -05:00
|
|
|
earnedSats
|
2022-09-12 13:55:34 -05:00
|
|
|
sources {
|
|
|
|
posts
|
|
|
|
comments
|
2023-07-09 12:21:11 -05:00
|
|
|
tipPosts
|
|
|
|
tipComments
|
2022-09-12 13:55:34 -05:00
|
|
|
}
|
2022-07-05 15:18:59 -05:00
|
|
|
}
|
2024-07-10 19:23:05 -05:00
|
|
|
... on ReferralReward {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
earnedSats
|
|
|
|
sources {
|
|
|
|
forever
|
|
|
|
oneDay
|
|
|
|
}
|
|
|
|
}
|
2022-12-19 16:27:52 -06:00
|
|
|
... on Referral {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2022-12-19 16:27:52 -06:00
|
|
|
sortTime
|
|
|
|
}
|
2021-08-17 13:15:24 -05:00
|
|
|
... on Reply {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2021-08-19 19:13:32 -05:00
|
|
|
sortTime
|
2021-08-17 13:15:24 -05:00
|
|
|
item {
|
2023-02-03 18:08:08 -06:00
|
|
|
...ItemFullFields
|
2021-08-17 13:15:24 -05:00
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2023-08-28 21:27:56 -04:00
|
|
|
... on FollowActivity {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
item {
|
|
|
|
...ItemFullFields
|
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2024-01-11 18:27:54 +01:00
|
|
|
... on TerritoryPost {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
item {
|
|
|
|
...ItemFullFields
|
|
|
|
text
|
|
|
|
}
|
|
|
|
}
|
2024-03-05 20:56:02 +01:00
|
|
|
... on TerritoryTransfer {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
sub {
|
|
|
|
...SubFields
|
|
|
|
}
|
|
|
|
}
|
2022-01-19 15:02:38 -06:00
|
|
|
... on Invitification {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2022-01-19 15:02:38 -06:00
|
|
|
sortTime
|
|
|
|
invite {
|
|
|
|
...InviteFields
|
|
|
|
}
|
|
|
|
}
|
2022-02-28 14:09:21 -06:00
|
|
|
... on JobChanged {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2022-02-28 14:09:21 -06:00
|
|
|
sortTime
|
|
|
|
item {
|
|
|
|
...ItemFields
|
|
|
|
}
|
|
|
|
}
|
2024-01-02 20:05:49 -06:00
|
|
|
... on SubStatus {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
sub {
|
|
|
|
...SubFields
|
|
|
|
}
|
|
|
|
}
|
2022-03-23 13:54:39 -05:00
|
|
|
... on InvoicePaid {
|
2023-07-23 10:08:43 -05:00
|
|
|
id
|
2022-03-23 13:54:39 -05:00
|
|
|
sortTime
|
|
|
|
earnedSats
|
|
|
|
invoice {
|
|
|
|
id
|
2023-08-08 20:19:31 +02:00
|
|
|
nostr
|
2023-09-23 21:14:49 -04:00
|
|
|
comment
|
2023-10-03 15:35:53 -04:00
|
|
|
lud18Data
|
2022-03-23 13:54:39 -05:00
|
|
|
}
|
|
|
|
}
|
2024-07-01 12:02:29 -05:00
|
|
|
... on Invoicification {
|
|
|
|
...InvoicificationFields
|
|
|
|
}
|
2024-03-25 21:20:11 +01:00
|
|
|
... on WithdrawlPaid {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
earnedSats
|
2024-04-16 17:53:05 +02:00
|
|
|
withdrawl {
|
|
|
|
autoWithdraw
|
2024-08-13 09:48:30 -05:00
|
|
|
p2p
|
|
|
|
satsFeePaid
|
2024-04-16 17:53:05 +02:00
|
|
|
}
|
2024-03-25 21:20:11 +01:00
|
|
|
}
|
2024-05-19 16:52:02 -04:00
|
|
|
... on Reminder {
|
|
|
|
id
|
|
|
|
sortTime
|
|
|
|
item {
|
|
|
|
...ItemFullFields
|
|
|
|
}
|
|
|
|
}
|
2021-08-17 13:15:24 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
} `
|