From 1396122423bf2ed978be642b1e7eef5effb36bc3 Mon Sep 17 00:00:00 2001 From: "t.me/xtekky" <98614666+xtekky@users.noreply.github.com> Date: Wed, 29 Mar 2023 21:10:42 +0100 Subject: poe api gpt-4 --- poe/graphql/AddHumanMessageMutation.graphql | 52 ++++ poe/graphql/AddMessageBreakMutation.graphql | 17 ++ poe/graphql/AutoSubscriptionMutation.graphql | 7 + poe/graphql/BioFragment.graphql | 8 + poe/graphql/ChatAddedSubscription.graphql | 5 + poe/graphql/ChatFragment.graphql | 6 + poe/graphql/ChatListPaginationQuery.graphql | 316 +++++++++++++++++++++ poe/graphql/ChatPaginationQuery.graphql | 26 ++ poe/graphql/ChatViewQuery.graphql | 8 + poe/graphql/DeleteHumanMessagesMutation.graphql | 7 + poe/graphql/DeleteMessageMutation.graphql | 7 + poe/graphql/HandleFragment.graphql | 8 + .../LoginWithVerificationCodeMutation.graphql | 13 + poe/graphql/MessageAddedSubscription.graphql | 100 +++++++ poe/graphql/MessageDeletedSubscription.graphql | 6 + poe/graphql/MessageFragment.graphql | 13 + poe/graphql/MessageRemoveVoteMutation.graphql | 7 + poe/graphql/MessageSetVoteMutation.graphql | 7 + .../SendVerificationCodeForLoginMutation.graphql | 12 + poe/graphql/ShareMessagesMutation.graphql | 9 + .../SignupWithVerificationCodeMutation.graphql | 13 + poe/graphql/StaleChatUpdateMutation.graphql | 7 + poe/graphql/SubscriptionsMutation.graphql | 9 + poe/graphql/SummarizePlainPostQuery.graphql | 3 + poe/graphql/SummarizeQuotePostQuery.graphql | 3 + poe/graphql/SummarizeSharePostQuery.graphql | 3 + poe/graphql/UserSnippetFragment.graphql | 14 + poe/graphql/ViewerInfoQuery.graphql | 21 ++ poe/graphql/ViewerStateFragment.graphql | 30 ++ poe/graphql/ViewerStateUpdatedSubscription.graphql | 43 +++ poe/graphql/__init__.py | 0 31 files changed, 780 insertions(+) create mode 100644 poe/graphql/AddHumanMessageMutation.graphql create mode 100644 poe/graphql/AddMessageBreakMutation.graphql create mode 100644 poe/graphql/AutoSubscriptionMutation.graphql create mode 100644 poe/graphql/BioFragment.graphql create mode 100644 poe/graphql/ChatAddedSubscription.graphql create mode 100644 poe/graphql/ChatFragment.graphql create mode 100644 poe/graphql/ChatListPaginationQuery.graphql create mode 100644 poe/graphql/ChatPaginationQuery.graphql create mode 100644 poe/graphql/ChatViewQuery.graphql create mode 100644 poe/graphql/DeleteHumanMessagesMutation.graphql create mode 100644 poe/graphql/DeleteMessageMutation.graphql create mode 100644 poe/graphql/HandleFragment.graphql create mode 100644 poe/graphql/LoginWithVerificationCodeMutation.graphql create mode 100644 poe/graphql/MessageAddedSubscription.graphql create mode 100644 poe/graphql/MessageDeletedSubscription.graphql create mode 100644 poe/graphql/MessageFragment.graphql create mode 100644 poe/graphql/MessageRemoveVoteMutation.graphql create mode 100644 poe/graphql/MessageSetVoteMutation.graphql create mode 100644 poe/graphql/SendVerificationCodeForLoginMutation.graphql create mode 100644 poe/graphql/ShareMessagesMutation.graphql create mode 100644 poe/graphql/SignupWithVerificationCodeMutation.graphql create mode 100644 poe/graphql/StaleChatUpdateMutation.graphql create mode 100644 poe/graphql/SubscriptionsMutation.graphql create mode 100644 poe/graphql/SummarizePlainPostQuery.graphql create mode 100644 poe/graphql/SummarizeQuotePostQuery.graphql create mode 100644 poe/graphql/SummarizeSharePostQuery.graphql create mode 100644 poe/graphql/UserSnippetFragment.graphql create mode 100644 poe/graphql/ViewerInfoQuery.graphql create mode 100644 poe/graphql/ViewerStateFragment.graphql create mode 100644 poe/graphql/ViewerStateUpdatedSubscription.graphql create mode 100644 poe/graphql/__init__.py (limited to 'poe/graphql') diff --git a/poe/graphql/AddHumanMessageMutation.graphql b/poe/graphql/AddHumanMessageMutation.graphql new file mode 100644 index 00000000..01e6bc8c --- /dev/null +++ b/poe/graphql/AddHumanMessageMutation.graphql @@ -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 + } + } +} diff --git a/poe/graphql/AddMessageBreakMutation.graphql b/poe/graphql/AddMessageBreakMutation.graphql new file mode 100644 index 00000000..b28d9903 --- /dev/null +++ b/poe/graphql/AddMessageBreakMutation.graphql @@ -0,0 +1,17 @@ +mutation AddMessageBreakMutation($chatId: BigInt!) { + messageBreakCreate(chatId: $chatId) { + message { + id + __typename + messageId + text + linkifiedText + authorNickname + state + vote + voteReason + creationTime + suggestedReplies + } + } +} diff --git a/poe/graphql/AutoSubscriptionMutation.graphql b/poe/graphql/AutoSubscriptionMutation.graphql new file mode 100644 index 00000000..6cf7bf74 --- /dev/null +++ b/poe/graphql/AutoSubscriptionMutation.graphql @@ -0,0 +1,7 @@ +mutation AutoSubscriptionMutation($subscriptions: [AutoSubscriptionQuery!]!) { + autoSubscribe(subscriptions: $subscriptions) { + viewer { + id + } + } +} diff --git a/poe/graphql/BioFragment.graphql b/poe/graphql/BioFragment.graphql new file mode 100644 index 00000000..c4218030 --- /dev/null +++ b/poe/graphql/BioFragment.graphql @@ -0,0 +1,8 @@ +fragment BioFragment on Viewer { + id + poeUser { + id + uid + bio + } +} diff --git a/poe/graphql/ChatAddedSubscription.graphql b/poe/graphql/ChatAddedSubscription.graphql new file mode 100644 index 00000000..664b107f --- /dev/null +++ b/poe/graphql/ChatAddedSubscription.graphql @@ -0,0 +1,5 @@ +subscription ChatAddedSubscription { + chatAdded { + ...ChatFragment + } +} diff --git a/poe/graphql/ChatFragment.graphql b/poe/graphql/ChatFragment.graphql new file mode 100644 index 00000000..605645ff --- /dev/null +++ b/poe/graphql/ChatFragment.graphql @@ -0,0 +1,6 @@ +fragment ChatFragment on Chat { + id + chatId + defaultBotNickname + shouldShowDisclaimer +} diff --git a/poe/graphql/ChatListPaginationQuery.graphql b/poe/graphql/ChatListPaginationQuery.graphql new file mode 100644 index 00000000..0bbaf568 --- /dev/null +++ b/poe/graphql/ChatListPaginationQuery.graphql @@ -0,0 +1,316 @@ +query ChatListPaginationQuery( + $count: Int = 5 + $cursor: String + $id: ID! +) { + node(id: $id) { + __typename + ...ChatPageMain_chat_1G22uz + id + } +} + +fragment BotImage_bot on Bot { + image { + __typename + ... on LocalBotImage { + localName + } + ... on UrlBotImage { + url + } + } + displayName +} + +fragment ChatMessageDownvotedButton_message on Message { + ...MessageFeedbackReasonModal_message + ...MessageFeedbackOtherModal_message +} + +fragment ChatMessageDropdownMenu_message on Message { + id + messageId + vote + text + linkifiedText + ...chatHelpers_isBotMessage +} + +fragment ChatMessageFeedbackButtons_message on Message { + id + messageId + vote + voteReason + ...ChatMessageDownvotedButton_message +} + +fragment ChatMessageInputView_chat on Chat { + id + chatId + defaultBotObject { + nickname + messageLimit { + dailyBalance + shouldShowRemainingMessageCount + } + id + } + shouldShowDisclaimer + ...chatHelpers_useSendMessage_chat + ...chatHelpers_useSendChatBreak_chat +} + +fragment ChatMessageInputView_edges on MessageEdge { + node { + ...chatHelpers_isChatBreak + ...chatHelpers_isHumanMessage + state + text + id + } +} + +fragment ChatMessageOverflowButton_message on Message { + text + ...ChatMessageDropdownMenu_message + ...chatHelpers_isBotMessage +} + +fragment ChatMessageSuggestedReplies_SuggestedReplyButton_chat on Chat { + ...chatHelpers_useSendMessage_chat +} + +fragment ChatMessageSuggestedReplies_SuggestedReplyButton_message on Message { + messageId +} + +fragment ChatMessageSuggestedReplies_chat on Chat { + ...ChatWelcomeView_chat + ...ChatMessageSuggestedReplies_SuggestedReplyButton_chat +} + +fragment ChatMessageSuggestedReplies_message on Message { + suggestedReplies + ...ChatMessageSuggestedReplies_SuggestedReplyButton_message +} + +fragment ChatMessage_chat on Chat { + defaultBotObject { + ...ChatPageDisclaimer_bot + messageLimit { + ...ChatPageRateLimitedBanner_messageLimit + } + id + } + ...ChatMessageSuggestedReplies_chat + ...ChatWelcomeView_chat +} + +fragment ChatMessage_message on Message { + id + messageId + text + author + linkifiedText + state + ...ChatMessageSuggestedReplies_message + ...ChatMessageFeedbackButtons_message + ...ChatMessageOverflowButton_message + ...chatHelpers_isHumanMessage + ...chatHelpers_isBotMessage + ...chatHelpers_isChatBreak + ...chatHelpers_useTimeoutLevel + ...MarkdownLinkInner_message +} + +fragment ChatMessagesView_chat on Chat { + ...ChatMessage_chat + ...ChatWelcomeView_chat + defaultBotObject { + messageLimit { + ...ChatPageRateLimitedBanner_messageLimit + } + id + } +} + +fragment ChatMessagesView_edges on MessageEdge { + node { + id + messageId + creationTime + ...ChatMessage_message + ...chatHelpers_isBotMessage + ...chatHelpers_isHumanMessage + ...chatHelpers_isChatBreak + } +} + +fragment ChatPageDeleteFooter_chat on Chat { + ...MessageDeleteConfirmationModal_chat +} + +fragment ChatPageDisclaimer_bot on Bot { + disclaimer +} + +fragment ChatPageMain_chat_1G22uz on Chat { + id + chatId + ...ChatMessageInputView_chat + ...ChatPageShareFooter_chat + ...ChatPageDeleteFooter_chat + ...ChatMessagesView_chat + ...MarkdownLinkInner_chat + ...chatHelpers_useUpdateStaleChat_chat + ...ChatSubscriptionPaywallContextWrapper_chat + messagesConnection(last: $count, before: $cursor) { + edges { + ...ChatMessagesView_edges + ...ChatMessageInputView_edges + ...MarkdownLinkInner_edges + node { + ...chatHelpers_useUpdateStaleChat_message + id + __typename + } + cursor + id + } + pageInfo { + hasPreviousPage + startCursor + } + id + } +} + +fragment ChatPageRateLimitedBanner_messageLimit on MessageLimit { + numMessagesRemaining +} + +fragment ChatPageShareFooter_chat on Chat { + chatId +} + +fragment ChatSubscriptionPaywallContextWrapper_chat on Chat { + defaultBotObject { + messageLimit { + numMessagesRemaining + shouldShowRemainingMessageCount + } + ...SubscriptionPaywallModal_bot + id + } +} + +fragment ChatWelcomeView_ChatWelcomeButton_chat on Chat { + ...chatHelpers_useSendMessage_chat +} + +fragment ChatWelcomeView_chat on Chat { + ...ChatWelcomeView_ChatWelcomeButton_chat + defaultBotObject { + displayName + id + } +} + +fragment MarkdownLinkInner_chat on Chat { + id + chatId + defaultBotObject { + nickname + id + } + ...chatHelpers_useSendMessage_chat +} + +fragment MarkdownLinkInner_edges on MessageEdge { + node { + state + id + } +} + +fragment MarkdownLinkInner_message on Message { + messageId +} + +fragment MessageDeleteConfirmationModal_chat on Chat { + id +} + +fragment MessageFeedbackOtherModal_message on Message { + id + messageId +} + +fragment MessageFeedbackReasonModal_message on Message { + id + messageId +} + +fragment SubscriptionPaywallModal_bot on Bot { + displayName + messageLimit { + dailyLimit + numMessagesRemaining + shouldShowRemainingMessageCount + resetTime + } + ...BotImage_bot +} + +fragment chatHelpers_isBotMessage on Message { + ...chatHelpers_isHumanMessage + ...chatHelpers_isChatBreak +} + +fragment chatHelpers_isChatBreak on Message { + author +} + +fragment chatHelpers_isHumanMessage on Message { + author +} + +fragment chatHelpers_useSendChatBreak_chat on Chat { + id + chatId + defaultBotObject { + nickname + introduction + model + id + } + shouldShowDisclaimer +} + +fragment chatHelpers_useSendMessage_chat on Chat { + id + chatId + defaultBotObject { + nickname + id + } + shouldShowDisclaimer +} + +fragment chatHelpers_useTimeoutLevel on Message { + id + state + text + messageId +} + +fragment chatHelpers_useUpdateStaleChat_chat on Chat { + chatId + ...chatHelpers_useSendChatBreak_chat +} + +fragment chatHelpers_useUpdateStaleChat_message on Message { + creationTime + ...chatHelpers_isChatBreak +} diff --git a/poe/graphql/ChatPaginationQuery.graphql b/poe/graphql/ChatPaginationQuery.graphql new file mode 100644 index 00000000..f2452cd6 --- /dev/null +++ b/poe/graphql/ChatPaginationQuery.graphql @@ -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 + } + } + } + } +} diff --git a/poe/graphql/ChatViewQuery.graphql b/poe/graphql/ChatViewQuery.graphql new file mode 100644 index 00000000..c330107d --- /dev/null +++ b/poe/graphql/ChatViewQuery.graphql @@ -0,0 +1,8 @@ +query ChatViewQuery($bot: String!) { + chatOfBot(bot: $bot) { + id + chatId + defaultBotNickname + shouldShowDisclaimer + } +} diff --git a/poe/graphql/DeleteHumanMessagesMutation.graphql b/poe/graphql/DeleteHumanMessagesMutation.graphql new file mode 100644 index 00000000..42692c6e --- /dev/null +++ b/poe/graphql/DeleteHumanMessagesMutation.graphql @@ -0,0 +1,7 @@ +mutation DeleteHumanMessagesMutation($messageIds: [BigInt!]!) { + messagesDelete(messageIds: $messageIds) { + viewer { + id + } + } +} diff --git a/poe/graphql/DeleteMessageMutation.graphql b/poe/graphql/DeleteMessageMutation.graphql new file mode 100644 index 00000000..7b9e36d4 --- /dev/null +++ b/poe/graphql/DeleteMessageMutation.graphql @@ -0,0 +1,7 @@ +mutation deleteMessageMutation( + $messageIds: [BigInt!]! +) { + messagesDelete(messageIds: $messageIds) { + edgeIds + } +} \ No newline at end of file diff --git a/poe/graphql/HandleFragment.graphql b/poe/graphql/HandleFragment.graphql new file mode 100644 index 00000000..f53c484b --- /dev/null +++ b/poe/graphql/HandleFragment.graphql @@ -0,0 +1,8 @@ +fragment HandleFragment on Viewer { + id + poeUser { + id + uid + handle + } +} diff --git a/poe/graphql/LoginWithVerificationCodeMutation.graphql b/poe/graphql/LoginWithVerificationCodeMutation.graphql new file mode 100644 index 00000000..723b1f44 --- /dev/null +++ b/poe/graphql/LoginWithVerificationCodeMutation.graphql @@ -0,0 +1,13 @@ +mutation LoginWithVerificationCodeMutation( + $verificationCode: String! + $emailAddress: String + $phoneNumber: String +) { + loginWithVerificationCode( + verificationCode: $verificationCode + emailAddress: $emailAddress + phoneNumber: $phoneNumber + ) { + status + } +} diff --git a/poe/graphql/MessageAddedSubscription.graphql b/poe/graphql/MessageAddedSubscription.graphql new file mode 100644 index 00000000..8dc9499c --- /dev/null +++ b/poe/graphql/MessageAddedSubscription.graphql @@ -0,0 +1,100 @@ +subscription messageAdded ( + $chatId: BigInt! +) { + messageAdded(chatId: $chatId) { + id + messageId + creationTime + state + ...ChatMessage_message + ...chatHelpers_isBotMessage + } +} + +fragment ChatMessageDownvotedButton_message on Message { + ...MessageFeedbackReasonModal_message + ...MessageFeedbackOtherModal_message +} + +fragment ChatMessageDropdownMenu_message on Message { + id + messageId + vote + text + linkifiedText + ...chatHelpers_isBotMessage +} + +fragment ChatMessageFeedbackButtons_message on Message { + id + messageId + vote + voteReason + ...ChatMessageDownvotedButton_message +} + +fragment ChatMessageOverflowButton_message on Message { + text + ...ChatMessageDropdownMenu_message + ...chatHelpers_isBotMessage +} + +fragment ChatMessageSuggestedReplies_SuggestedReplyButton_message on Message { + messageId +} + +fragment ChatMessageSuggestedReplies_message on Message { + suggestedReplies + ...ChatMessageSuggestedReplies_SuggestedReplyButton_message +} + +fragment ChatMessage_message on Message { + id + messageId + text + author + linkifiedText + state + ...ChatMessageSuggestedReplies_message + ...ChatMessageFeedbackButtons_message + ...ChatMessageOverflowButton_message + ...chatHelpers_isHumanMessage + ...chatHelpers_isBotMessage + ...chatHelpers_isChatBreak + ...chatHelpers_useTimeoutLevel + ...MarkdownLinkInner_message +} + +fragment MarkdownLinkInner_message on Message { + messageId +} + +fragment MessageFeedbackOtherModal_message on Message { + id + messageId +} + +fragment MessageFeedbackReasonModal_message on Message { + id + messageId +} + +fragment chatHelpers_isBotMessage on Message { + ...chatHelpers_isHumanMessage + ...chatHelpers_isChatBreak +} + +fragment chatHelpers_isChatBreak on Message { + author +} + +fragment chatHelpers_isHumanMessage on Message { + author +} + +fragment chatHelpers_useTimeoutLevel on Message { + id + state + text + messageId +} diff --git a/poe/graphql/MessageDeletedSubscription.graphql b/poe/graphql/MessageDeletedSubscription.graphql new file mode 100644 index 00000000..54c1c164 --- /dev/null +++ b/poe/graphql/MessageDeletedSubscription.graphql @@ -0,0 +1,6 @@ +subscription MessageDeletedSubscription($chatId: BigInt!) { + messageDeleted(chatId: $chatId) { + id + messageId + } +} diff --git a/poe/graphql/MessageFragment.graphql b/poe/graphql/MessageFragment.graphql new file mode 100644 index 00000000..cc860811 --- /dev/null +++ b/poe/graphql/MessageFragment.graphql @@ -0,0 +1,13 @@ +fragment MessageFragment on Message { + id + __typename + messageId + text + linkifiedText + authorNickname + state + vote + voteReason + creationTime + suggestedReplies +} diff --git a/poe/graphql/MessageRemoveVoteMutation.graphql b/poe/graphql/MessageRemoveVoteMutation.graphql new file mode 100644 index 00000000..d5e6e610 --- /dev/null +++ b/poe/graphql/MessageRemoveVoteMutation.graphql @@ -0,0 +1,7 @@ +mutation MessageRemoveVoteMutation($messageId: BigInt!) { + messageRemoveVote(messageId: $messageId) { + message { + ...MessageFragment + } + } +} diff --git a/poe/graphql/MessageSetVoteMutation.graphql b/poe/graphql/MessageSetVoteMutation.graphql new file mode 100644 index 00000000..76000df0 --- /dev/null +++ b/poe/graphql/MessageSetVoteMutation.graphql @@ -0,0 +1,7 @@ +mutation MessageSetVoteMutation($messageId: BigInt!, $voteType: VoteType!, $reason: String) { + messageSetVote(messageId: $messageId, voteType: $voteType, reason: $reason) { + message { + ...MessageFragment + } + } +} diff --git a/poe/graphql/SendVerificationCodeForLoginMutation.graphql b/poe/graphql/SendVerificationCodeForLoginMutation.graphql new file mode 100644 index 00000000..45af4799 --- /dev/null +++ b/poe/graphql/SendVerificationCodeForLoginMutation.graphql @@ -0,0 +1,12 @@ +mutation SendVerificationCodeForLoginMutation( + $emailAddress: String + $phoneNumber: String +) { + sendVerificationCode( + verificationReason: login + emailAddress: $emailAddress + phoneNumber: $phoneNumber + ) { + status + } +} diff --git a/poe/graphql/ShareMessagesMutation.graphql b/poe/graphql/ShareMessagesMutation.graphql new file mode 100644 index 00000000..92e80db5 --- /dev/null +++ b/poe/graphql/ShareMessagesMutation.graphql @@ -0,0 +1,9 @@ +mutation ShareMessagesMutation( + $chatId: BigInt! + $messageIds: [BigInt!]! + $comment: String +) { + messagesShare(chatId: $chatId, messageIds: $messageIds, comment: $comment) { + shareCode + } +} diff --git a/poe/graphql/SignupWithVerificationCodeMutation.graphql b/poe/graphql/SignupWithVerificationCodeMutation.graphql new file mode 100644 index 00000000..06b2826f --- /dev/null +++ b/poe/graphql/SignupWithVerificationCodeMutation.graphql @@ -0,0 +1,13 @@ +mutation SignupWithVerificationCodeMutation( + $verificationCode: String! + $emailAddress: String + $phoneNumber: String +) { + signupWithVerificationCode( + verificationCode: $verificationCode + emailAddress: $emailAddress + phoneNumber: $phoneNumber + ) { + status + } +} diff --git a/poe/graphql/StaleChatUpdateMutation.graphql b/poe/graphql/StaleChatUpdateMutation.graphql new file mode 100644 index 00000000..de203d47 --- /dev/null +++ b/poe/graphql/StaleChatUpdateMutation.graphql @@ -0,0 +1,7 @@ +mutation StaleChatUpdateMutation($chatId: BigInt!) { + staleChatUpdate(chatId: $chatId) { + message { + ...MessageFragment + } + } +} diff --git a/poe/graphql/SubscriptionsMutation.graphql b/poe/graphql/SubscriptionsMutation.graphql new file mode 100644 index 00000000..b864bd60 --- /dev/null +++ b/poe/graphql/SubscriptionsMutation.graphql @@ -0,0 +1,9 @@ +mutation subscriptionsMutation( + $subscriptions: [AutoSubscriptionQuery!]! +) { + autoSubscribe(subscriptions: $subscriptions) { + viewer { + id + } + } +} \ No newline at end of file diff --git a/poe/graphql/SummarizePlainPostQuery.graphql b/poe/graphql/SummarizePlainPostQuery.graphql new file mode 100644 index 00000000..afa2a84c --- /dev/null +++ b/poe/graphql/SummarizePlainPostQuery.graphql @@ -0,0 +1,3 @@ +query SummarizePlainPostQuery($comment: String!) { + summarizePlainPost(comment: $comment) +} diff --git a/poe/graphql/SummarizeQuotePostQuery.graphql b/poe/graphql/SummarizeQuotePostQuery.graphql new file mode 100644 index 00000000..5147c3c5 --- /dev/null +++ b/poe/graphql/SummarizeQuotePostQuery.graphql @@ -0,0 +1,3 @@ +query SummarizeQuotePostQuery($comment: String, $quotedPostId: BigInt!) { + summarizeQuotePost(comment: $comment, quotedPostId: $quotedPostId) +} diff --git a/poe/graphql/SummarizeSharePostQuery.graphql b/poe/graphql/SummarizeSharePostQuery.graphql new file mode 100644 index 00000000..cb4a623c --- /dev/null +++ b/poe/graphql/SummarizeSharePostQuery.graphql @@ -0,0 +1,3 @@ +query SummarizeSharePostQuery($comment: String!, $chatId: BigInt!, $messageIds: [BigInt!]!) { + summarizeSharePost(comment: $comment, chatId: $chatId, messageIds: $messageIds) +} diff --git a/poe/graphql/UserSnippetFragment.graphql b/poe/graphql/UserSnippetFragment.graphql new file mode 100644 index 00000000..17fc8426 --- /dev/null +++ b/poe/graphql/UserSnippetFragment.graphql @@ -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 +} diff --git a/poe/graphql/ViewerInfoQuery.graphql b/poe/graphql/ViewerInfoQuery.graphql new file mode 100644 index 00000000..1ecaf9e8 --- /dev/null +++ b/poe/graphql/ViewerInfoQuery.graphql @@ -0,0 +1,21 @@ +query ViewerInfoQuery { + viewer { + id + uid + ...ViewerStateFragment + ...BioFragment + ...HandleFragment + hasCompletedMultiplayerNux + poeUser { + id + ...UserSnippetFragment + } + messageLimit{ + canSend + numMessagesRemaining + resetTime + shouldShowReminder + } + } +} + diff --git a/poe/graphql/ViewerStateFragment.graphql b/poe/graphql/ViewerStateFragment.graphql new file mode 100644 index 00000000..3cd83e9c --- /dev/null +++ b/poe/graphql/ViewerStateFragment.graphql @@ -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 + } +} + diff --git a/poe/graphql/ViewerStateUpdatedSubscription.graphql b/poe/graphql/ViewerStateUpdatedSubscription.graphql new file mode 100644 index 00000000..03fc73d1 --- /dev/null +++ b/poe/graphql/ViewerStateUpdatedSubscription.graphql @@ -0,0 +1,43 @@ +subscription viewerStateUpdated { + viewerStateUpdated { + id + ...ChatPageBotSwitcher_viewer + } +} + +fragment BotHeader_bot on Bot { + displayName + messageLimit { + dailyLimit + } + ...BotImage_bot +} + +fragment BotImage_bot on Bot { + image { + __typename + ... on LocalBotImage { + localName + } + ... on UrlBotImage { + url + } + } + displayName +} + +fragment BotLink_bot on Bot { + displayName +} + +fragment ChatPageBotSwitcher_viewer on Viewer { + availableBots { + id + messageLimit { + dailyLimit + } + ...BotLink_bot + ...BotHeader_bot + } + allowUserCreatedBots: booleanGate(gateName: "enable_user_created_bots") +} diff --git a/poe/graphql/__init__.py b/poe/graphql/__init__.py new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3