SatsAllDay dc0370ba17
random zap amounts (#1263)
* add random zapping support

adds an option to enable random zap amounts per stacker

configurable in settings, you can enable this feature and provide
an upper and lower range of your random zap amount

* rename github eslint check to lint

this has been bothering me since we aren't using eslint for linting

* fixup! add random zapping support

* fixup! rename github eslint check to lint

* fixup! fixup! add random zapping support

---------

Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
2024-07-26 22:37:03 -05:00

206 lines
5.1 KiB
JavaScript

import { gql } from 'graphql-tag'
export default gql`
extend type Query {
me: User
settings: User
user(name: String!): User
users: [User!]
nameAvailable(name: String!): Boolean!
topUsers(cursor: String, when: String, from: String, to: String, by: String, limit: Limit): UsersNullable!
topCowboys(cursor: String): UsersNullable!
searchUsers(q: String!, limit: Limit, similarity: Float): [User!]!
userSuggestions(q: String, limit: Limit): [User!]!
hasNewNotes: Boolean!
mySubscribedUsers(cursor: String): Users!
myMutedUsers(cursor: String): Users!
userStatsActions(when: String, from: String, to: String): [TimeData!]!
userStatsIncomingSats(when: String, from: String, to: String): [TimeData!]!
userStatsOutgoingSats(when: String, from: String, to: String): [TimeData!]!
}
type UsersNullable {
cursor: String
users: [User]!
}
type Users {
cursor: String
users: [User!]!
}
extend type Mutation {
setName(name: String!): String
setSettings(settings: SettingsInput!): User
setPhoto(photoId: ID!): Int!
upsertBio(bio: String!): User!
setWalkthrough(tipPopover: Boolean, upvotePopover: Boolean): Boolean
unlinkAuth(authType: String!): AuthMethods!
linkUnverifiedEmail(email: String!): Boolean
hideWelcomeBanner: Boolean
subscribeUserPosts(id: ID): User
subscribeUserComments(id: ID): User
toggleMute(id: ID): User
generateApiKey(id: ID!): String
deleteApiKey(id: ID!): User
}
type User {
id: ID!
createdAt: Date!
name: String
nitems(when: String, from: String, to: String): Int!
nposts(when: String, from: String, to: String): Int!
nterritories(when: String, from: String, to: String): Int!
ncomments(when: String, from: String, to: String): Int!
bio: Item
bioId: Int
photoId: Int
since: Int
optional: UserOptional!
privates: UserPrivates
meMute: Boolean!
meSubscriptionPosts: Boolean!
meSubscriptionComments: Boolean!
}
input SettingsInput {
autoDropBolt11s: Boolean!
diagnostics: Boolean!
noReferralLinks: Boolean!
fiatCurrency: String!
greeterMode: Boolean!
hideBookmarks: Boolean!
hideCowboyHat: Boolean!
hideGithub: Boolean!
hideNostr: Boolean!
hideTwitter: Boolean!
hideFromTopUsers: Boolean!
hideInvoiceDesc: Boolean!
hideIsContributor: Boolean!
hideWalletBalance: Boolean!
imgproxyOnly: Boolean!
nostrCrossposting: Boolean!
nostrPubkey: String
nostrRelays: [String!]
noteAllDescendants: Boolean!
noteCowboyHat: Boolean!
noteDeposits: Boolean!,
noteWithdrawals: Boolean!,
noteEarning: Boolean!
noteForwardedSats: Boolean!
noteInvites: Boolean!
noteItemSats: Boolean!
noteJobIndicator: Boolean!
noteMentions: Boolean!
noteItemMentions: Boolean!
nsfwMode: Boolean!
tipDefault: Int!
tipRandomMin: Int
tipRandomMax: Int
turboTipping: Boolean!
zapUndos: Int
wildWestMode: Boolean!
withdrawMaxFeeDefault: Int!
}
type AuthMethods {
lightning: Boolean!
nostr: Boolean!
github: Boolean!
twitter: Boolean!
email: Boolean!
apiKey: Boolean
}
type UserPrivates {
"""
extremely sensitive
"""
sats: Int!
authMethods: AuthMethods!
lnAddr: String
"""
only relevant to user
"""
lastCheckedJobs: String
hideWelcomeBanner: Boolean!
tipPopover: Boolean!
upvotePopover: Boolean!
hasInvites: Boolean!
apiKeyEnabled: Boolean!
"""
mirrors SettingsInput
"""
autoDropBolt11s: Boolean!
diagnostics: Boolean!
noReferralLinks: Boolean!
fiatCurrency: String!
greeterMode: Boolean!
hideBookmarks: Boolean!
hideCowboyHat: Boolean!
hideGithub: Boolean!
hideNostr: Boolean!
hideTwitter: Boolean!
hideFromTopUsers: Boolean!
hideInvoiceDesc: Boolean!
hideIsContributor: Boolean!
hideWalletBalance: Boolean!
imgproxyOnly: Boolean!
nostrCrossposting: Boolean!
nostrPubkey: String
nostrRelays: [String!]
noteAllDescendants: Boolean!
noteCowboyHat: Boolean!
noteDeposits: Boolean!
noteWithdrawals: Boolean!
noteEarning: Boolean!
noteForwardedSats: Boolean!
noteInvites: Boolean!
noteItemSats: Boolean!
noteJobIndicator: Boolean!
noteMentions: Boolean!
noteItemMentions: Boolean!
nsfwMode: Boolean!
tipDefault: Int!
tipRandom: Boolean!
tipRandomMin: Int
tipRandomMax: Int
turboTipping: Boolean!
zapUndos: Int
wildWestMode: Boolean!
withdrawMaxFeeDefault: Int!
autoWithdrawThreshold: Int
autoWithdrawMaxFeePercent: Float
}
type UserOptional {
"""
conditionally private
"""
stacked(when: String, from: String, to: String): Int
spent(when: String, from: String, to: String): Int
referrals(when: String, from: String, to: String): Int
streak: Int
maxStreak: Int
isContributor: Boolean
githubId: String
twitterId: String
nostrAuthPubkey: String
}
type NameValue {
name: String!
value: Float!
}
type TimeData {
time: Date!
data: [NameValue!]!
}
`