mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-17 13:57:10 +00:00
feat: add support for Claude and Poe(WIP)
This commit is contained in:
parent
a3a16bc5ff
commit
7ef6051da8
38 changed files with 882 additions and 19 deletions
52
utils/poe/graphql/AddHumanMessageMutation.graphql
Normal file
52
utils/poe/graphql/AddHumanMessageMutation.graphql
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
mutation AddHumanMessageMutation(
|
||||
$chatId: BigInt!
|
||||
$bot: String!
|
||||
$query: String!
|
||||
$source: MessageSource
|
||||
$withChatBreak: Boolean! = false
|
||||
) {
|
||||
messageCreateWithStatus(
|
||||
chatId: $chatId
|
||||
bot: $bot
|
||||
query: $query
|
||||
source: $source
|
||||
withChatBreak: $withChatBreak
|
||||
) {
|
||||
message {
|
||||
id
|
||||
__typename
|
||||
messageId
|
||||
text
|
||||
linkifiedText
|
||||
authorNickname
|
||||
state
|
||||
vote
|
||||
voteReason
|
||||
creationTime
|
||||
suggestedReplies
|
||||
chat {
|
||||
id
|
||||
shouldShowDisclaimer
|
||||
}
|
||||
}
|
||||
messageLimit{
|
||||
canSend
|
||||
numMessagesRemaining
|
||||
resetTime
|
||||
shouldShowReminder
|
||||
}
|
||||
chatBreak {
|
||||
id
|
||||
__typename
|
||||
messageId
|
||||
text
|
||||
linkifiedText
|
||||
authorNickname
|
||||
state
|
||||
vote
|
||||
voteReason
|
||||
creationTime
|
||||
suggestedReplies
|
||||
}
|
||||
}
|
||||
}
|
||||
17
utils/poe/graphql/AddMessageBreakMutation.graphql
Normal file
17
utils/poe/graphql/AddMessageBreakMutation.graphql
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
mutation AddMessageBreakMutation($chatId: BigInt!) {
|
||||
messageBreakCreate(chatId: $chatId) {
|
||||
message {
|
||||
id
|
||||
__typename
|
||||
messageId
|
||||
text
|
||||
linkifiedText
|
||||
authorNickname
|
||||
state
|
||||
vote
|
||||
voteReason
|
||||
creationTime
|
||||
suggestedReplies
|
||||
}
|
||||
}
|
||||
}
|
||||
7
utils/poe/graphql/AutoSubscriptionMutation.graphql
Normal file
7
utils/poe/graphql/AutoSubscriptionMutation.graphql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mutation AutoSubscriptionMutation($subscriptions: [AutoSubscriptionQuery!]!) {
|
||||
autoSubscribe(subscriptions: $subscriptions) {
|
||||
viewer {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
8
utils/poe/graphql/BioFragment.graphql
Normal file
8
utils/poe/graphql/BioFragment.graphql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fragment BioFragment on Viewer {
|
||||
id
|
||||
poeUser {
|
||||
id
|
||||
uid
|
||||
bio
|
||||
}
|
||||
}
|
||||
5
utils/poe/graphql/ChatAddedSubscription.graphql
Normal file
5
utils/poe/graphql/ChatAddedSubscription.graphql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
subscription ChatAddedSubscription {
|
||||
chatAdded {
|
||||
...ChatFragment
|
||||
}
|
||||
}
|
||||
6
utils/poe/graphql/ChatFragment.graphql
Normal file
6
utils/poe/graphql/ChatFragment.graphql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
fragment ChatFragment on Chat {
|
||||
id
|
||||
chatId
|
||||
defaultBotNickname
|
||||
shouldShowDisclaimer
|
||||
}
|
||||
26
utils/poe/graphql/ChatPaginationQuery.graphql
Normal file
26
utils/poe/graphql/ChatPaginationQuery.graphql
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
query ChatPaginationQuery($bot: String!, $before: String, $last: Int! = 10) {
|
||||
chatOfBot(bot: $bot) {
|
||||
id
|
||||
__typename
|
||||
messagesConnection(before: $before, last: $last) {
|
||||
pageInfo {
|
||||
hasPreviousPage
|
||||
}
|
||||
edges {
|
||||
node {
|
||||
id
|
||||
__typename
|
||||
messageId
|
||||
text
|
||||
linkifiedText
|
||||
authorNickname
|
||||
state
|
||||
vote
|
||||
voteReason
|
||||
creationTime
|
||||
suggestedReplies
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
8
utils/poe/graphql/ChatViewQuery.graphql
Normal file
8
utils/poe/graphql/ChatViewQuery.graphql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
query ChatViewQuery($bot: String!) {
|
||||
chatOfBot(bot: $bot) {
|
||||
id
|
||||
chatId
|
||||
defaultBotNickname
|
||||
shouldShowDisclaimer
|
||||
}
|
||||
}
|
||||
7
utils/poe/graphql/DeleteHumanMessagesMutation.graphql
Normal file
7
utils/poe/graphql/DeleteHumanMessagesMutation.graphql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mutation DeleteHumanMessagesMutation($messageIds: [BigInt!]!) {
|
||||
messagesDelete(messageIds: $messageIds) {
|
||||
viewer {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
8
utils/poe/graphql/HandleFragment.graphql
Normal file
8
utils/poe/graphql/HandleFragment.graphql
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fragment HandleFragment on Viewer {
|
||||
id
|
||||
poeUser {
|
||||
id
|
||||
uid
|
||||
handle
|
||||
}
|
||||
}
|
||||
13
utils/poe/graphql/LoginWithVerificationCodeMutation.graphql
Normal file
13
utils/poe/graphql/LoginWithVerificationCodeMutation.graphql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
mutation LoginWithVerificationCodeMutation(
|
||||
$verificationCode: String!
|
||||
$emailAddress: String
|
||||
$phoneNumber: String
|
||||
) {
|
||||
loginWithVerificationCode(
|
||||
verificationCode: $verificationCode
|
||||
emailAddress: $emailAddress
|
||||
phoneNumber: $phoneNumber
|
||||
) {
|
||||
status
|
||||
}
|
||||
}
|
||||
5
utils/poe/graphql/MessageAddedSubscription.graphql
Normal file
5
utils/poe/graphql/MessageAddedSubscription.graphql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
subscription MessageAddedSubscription($chatId: BigInt!) {
|
||||
messageAdded(chatId: $chatId) {
|
||||
...MessageFragment
|
||||
}
|
||||
}
|
||||
6
utils/poe/graphql/MessageDeletedSubscription.graphql
Normal file
6
utils/poe/graphql/MessageDeletedSubscription.graphql
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
subscription MessageDeletedSubscription($chatId: BigInt!) {
|
||||
messageDeleted(chatId: $chatId) {
|
||||
id
|
||||
messageId
|
||||
}
|
||||
}
|
||||
13
utils/poe/graphql/MessageFragment.graphql
Normal file
13
utils/poe/graphql/MessageFragment.graphql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
fragment MessageFragment on Message {
|
||||
id
|
||||
__typename
|
||||
messageId
|
||||
text
|
||||
linkifiedText
|
||||
authorNickname
|
||||
state
|
||||
vote
|
||||
voteReason
|
||||
creationTime
|
||||
suggestedReplies
|
||||
}
|
||||
7
utils/poe/graphql/MessageRemoveVoteMutation.graphql
Normal file
7
utils/poe/graphql/MessageRemoveVoteMutation.graphql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mutation MessageRemoveVoteMutation($messageId: BigInt!) {
|
||||
messageRemoveVote(messageId: $messageId) {
|
||||
message {
|
||||
...MessageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
7
utils/poe/graphql/MessageSetVoteMutation.graphql
Normal file
7
utils/poe/graphql/MessageSetVoteMutation.graphql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mutation MessageSetVoteMutation($messageId: BigInt!, $voteType: VoteType!, $reason: String) {
|
||||
messageSetVote(messageId: $messageId, voteType: $voteType, reason: $reason) {
|
||||
message {
|
||||
...MessageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
mutation SendVerificationCodeForLoginMutation(
|
||||
$emailAddress: String
|
||||
$phoneNumber: String
|
||||
) {
|
||||
sendVerificationCode(
|
||||
verificationReason: login
|
||||
emailAddress: $emailAddress
|
||||
phoneNumber: $phoneNumber
|
||||
) {
|
||||
status
|
||||
}
|
||||
}
|
||||
9
utils/poe/graphql/ShareMessagesMutation.graphql
Normal file
9
utils/poe/graphql/ShareMessagesMutation.graphql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
mutation ShareMessagesMutation(
|
||||
$chatId: BigInt!
|
||||
$messageIds: [BigInt!]!
|
||||
$comment: String
|
||||
) {
|
||||
messagesShare(chatId: $chatId, messageIds: $messageIds, comment: $comment) {
|
||||
shareCode
|
||||
}
|
||||
}
|
||||
13
utils/poe/graphql/SignupWithVerificationCodeMutation.graphql
Normal file
13
utils/poe/graphql/SignupWithVerificationCodeMutation.graphql
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
mutation SignupWithVerificationCodeMutation(
|
||||
$verificationCode: String!
|
||||
$emailAddress: String
|
||||
$phoneNumber: String
|
||||
) {
|
||||
signupWithVerificationCode(
|
||||
verificationCode: $verificationCode
|
||||
emailAddress: $emailAddress
|
||||
phoneNumber: $phoneNumber
|
||||
) {
|
||||
status
|
||||
}
|
||||
}
|
||||
7
utils/poe/graphql/StaleChatUpdateMutation.graphql
Normal file
7
utils/poe/graphql/StaleChatUpdateMutation.graphql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
mutation StaleChatUpdateMutation($chatId: BigInt!) {
|
||||
staleChatUpdate(chatId: $chatId) {
|
||||
message {
|
||||
...MessageFragment
|
||||
}
|
||||
}
|
||||
}
|
||||
3
utils/poe/graphql/SummarizePlainPostQuery.graphql
Normal file
3
utils/poe/graphql/SummarizePlainPostQuery.graphql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
query SummarizePlainPostQuery($comment: String!) {
|
||||
summarizePlainPost(comment: $comment)
|
||||
}
|
||||
3
utils/poe/graphql/SummarizeQuotePostQuery.graphql
Normal file
3
utils/poe/graphql/SummarizeQuotePostQuery.graphql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
query SummarizeQuotePostQuery($comment: String, $quotedPostId: BigInt!) {
|
||||
summarizeQuotePost(comment: $comment, quotedPostId: $quotedPostId)
|
||||
}
|
||||
3
utils/poe/graphql/SummarizeSharePostQuery.graphql
Normal file
3
utils/poe/graphql/SummarizeSharePostQuery.graphql
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
query SummarizeSharePostQuery($comment: String!, $chatId: BigInt!, $messageIds: [BigInt!]!) {
|
||||
summarizeSharePost(comment: $comment, chatId: $chatId, messageIds: $messageIds)
|
||||
}
|
||||
14
utils/poe/graphql/UserSnippetFragment.graphql
Normal file
14
utils/poe/graphql/UserSnippetFragment.graphql
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
fragment UserSnippetFragment on PoeUser {
|
||||
id
|
||||
uid
|
||||
bio
|
||||
handle
|
||||
fullName
|
||||
viewerIsFollowing
|
||||
isPoeOnlyUser
|
||||
profilePhotoURLTiny: profilePhotoUrl(size: tiny)
|
||||
profilePhotoURLSmall: profilePhotoUrl(size: small)
|
||||
profilePhotoURLMedium: profilePhotoUrl(size: medium)
|
||||
profilePhotoURLLarge: profilePhotoUrl(size: large)
|
||||
isFollowable
|
||||
}
|
||||
21
utils/poe/graphql/ViewerInfoQuery.graphql
Normal file
21
utils/poe/graphql/ViewerInfoQuery.graphql
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
query ViewerInfoQuery {
|
||||
viewer {
|
||||
id
|
||||
uid
|
||||
...ViewerStateFragment
|
||||
...BioFragment
|
||||
...HandleFragment
|
||||
hasCompletedMultiplayerNux
|
||||
poeUser {
|
||||
id
|
||||
...UserSnippetFragment
|
||||
}
|
||||
messageLimit{
|
||||
canSend
|
||||
numMessagesRemaining
|
||||
resetTime
|
||||
shouldShowReminder
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
30
utils/poe/graphql/ViewerStateFragment.graphql
Normal file
30
utils/poe/graphql/ViewerStateFragment.graphql
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
fragment ViewerStateFragment on Viewer {
|
||||
id
|
||||
__typename
|
||||
iosMinSupportedVersion: integerGate(gateName: "poe_ios_min_supported_version")
|
||||
iosMinEncouragedVersion: integerGate(
|
||||
gateName: "poe_ios_min_encouraged_version"
|
||||
)
|
||||
macosMinSupportedVersion: integerGate(
|
||||
gateName: "poe_macos_min_supported_version"
|
||||
)
|
||||
macosMinEncouragedVersion: integerGate(
|
||||
gateName: "poe_macos_min_encouraged_version"
|
||||
)
|
||||
showPoeDebugPanel: booleanGate(gateName: "poe_show_debug_panel")
|
||||
enableCommunityFeed: booleanGate(gateName: "enable_poe_shares_feed")
|
||||
linkifyText: booleanGate(gateName: "poe_linkify_response")
|
||||
enableSuggestedReplies: booleanGate(gateName: "poe_suggested_replies")
|
||||
removeInviteLimit: booleanGate(gateName: "poe_remove_invite_limit")
|
||||
enableInAppPurchases: booleanGate(gateName: "poe_enable_in_app_purchases")
|
||||
availableBots {
|
||||
nickname
|
||||
displayName
|
||||
profilePicture
|
||||
isDown
|
||||
disclaimer
|
||||
subtitle
|
||||
poweredBy
|
||||
}
|
||||
}
|
||||
|
||||
5
utils/poe/graphql/ViewerStateUpdatedSubscription.graphql
Normal file
5
utils/poe/graphql/ViewerStateUpdatedSubscription.graphql
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
subscription ViewerStateUpdatedSubscription {
|
||||
viewerStateUpdated {
|
||||
...ViewerStateFragment
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue