-
Notifications
You must be signed in to change notification settings - Fork 9
Tighten Telegram schema #246
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
miniBill
wants to merge
2
commits into
main
Choose a base branch
from
tighten-telegram-schema
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --ignore-all-space --minimal --new-file --recursive main/cli/generated/TelegramBotApi/Json.elm branch/cli/generated/TelegramBotApi/Json.elm
301,302c301,310
< encodeBackgroundFill =
< Basics.identity
---
> encodeBackgroundFill rec =
> case rec of
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillFreeformGradient content ->
> encodeBackgroundFillFreeformGradient content
>
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillGradient content ->
> encodeBackgroundFillGradient content
>
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillSolid content ->
> encodeBackgroundFillSolid content
332,333c340,352
< encodeBackgroundType =
< Basics.identity
---
> encodeBackgroundType rec =
> case rec of
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeChatTheme content ->
> encodeBackgroundTypeChatTheme content
>
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeFill content ->
> encodeBackgroundTypeFill content
>
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypePattern content ->
> encodeBackgroundTypePattern content
>
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeWallpaper content ->
> encodeBackgroundTypeWallpaper content
416,417c435,456
< encodeBotCommandScope =
< Basics.identity
---
> encodeBotCommandScope rec =
> case rec of
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllChatAdministrators content ->
> encodeBotCommandScopeAllChatAdministrators content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllGroupChats content ->
> encodeBotCommandScopeAllGroupChats content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllPrivateChats content ->
> encodeBotCommandScopeAllPrivateChats content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChat content ->
> encodeBotCommandScopeChat content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChatAdministrators content ->
> encodeBotCommandScopeChatAdministrators content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChatMember content ->
> encodeBotCommandScopeChatMember content
>
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeDefault content ->
> encodeBotCommandScopeDefault content
797,798c836,845
< encodeChatBoostSource =
< Basics.identity
---
> encodeChatBoostSource rec =
> case rec of
> TelegramBotApi.Types.ChatBoostSourceGiftCode_Or_ChatBoostSourceGiveaway_Or_ChatBoostSourcePremium__ChatBoostSourceGiftCode content ->
> encodeChatBoostSourceGiftCode content
>
> TelegramBotApi.Types.ChatBoostSourceGiftCode_Or_ChatBoostSourceGiveaway_Or_ChatBoostSourcePremium__ChatBoostSourceGiveaway content ->
> encodeChatBoostSourceGiveaway content
>
> TelegramBotApi.Types.ChatBoostSourceGiftCode_Or_ChatBoostSourceGiveaway_Or_ChatBoostSourcePremium__ChatBoostSourcePremium content ->
> encodeChatBoostSourcePremium content
1152,1153c1199,1217
< encodeChatMember =
< Basics.identity
---
> encodeChatMember rec =
> case rec of
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberAdministrator content ->
> encodeChatMemberAdministrator content
>
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberBanned content ->
> encodeChatMemberBanned content
>
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberLeft content ->
> encodeChatMemberLeft content
>
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberMember content ->
> encodeChatMemberMember content
>
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberOwner content ->
> encodeChatMemberOwner content
>
> TelegramBotApi.Types.ChatMemberAdministrator_Or_ChatMemberBanned_Or_ChatMemberLeft_Or_ChatMemberMember_Or_ChatMemberOwner_Or_ChatMemberRestricted__ChatMemberRestricted content ->
> encodeChatMemberRestricted content
3426,3427c3490,3505
< encodeInputMedia =
< Basics.identity
---
> encodeInputMedia rec =
> case rec of
> TelegramBotApi.Types.InputMediaAnimation_Or_InputMediaAudio_Or_InputMediaDocument_Or_InputMediaPhoto_Or_InputMediaVideo__InputMediaAnimation content ->
> encodeInputMediaAnimation content
>
> TelegramBotApi.Types.InputMediaAnimation_Or_InputMediaAudio_Or_InputMediaDocument_Or_InputMediaPhoto_Or_InputMediaVideo__InputMediaAudio content ->
> encodeInputMediaAudio content
>
> TelegramBotApi.Types.InputMediaAnimation_Or_InputMediaAudio_Or_InputMediaDocument_Or_InputMediaPhoto_Or_InputMediaVideo__InputMediaDocument content ->
> encodeInputMediaDocument content
>
> TelegramBotApi.Types.InputMediaAnimation_Or_InputMediaAudio_Or_InputMediaDocument_Or_InputMediaPhoto_Or_InputMediaVideo__InputMediaPhoto content ->
> encodeInputMediaPhoto content
>
> TelegramBotApi.Types.InputMediaAnimation_Or_InputMediaAudio_Or_InputMediaDocument_Or_InputMediaPhoto_Or_InputMediaVideo__InputMediaVideo content ->
> encodeInputMediaVideo content
3637,3638c3715,3721
< encodeInputPaidMedia =
< Basics.identity
---
> encodeInputPaidMedia rec =
> case rec of
> TelegramBotApi.Types.InputPaidMediaPhoto_Or_InputPaidMediaVideo__InputPaidMediaPhoto content ->
> encodeInputPaidMediaPhoto content
>
> TelegramBotApi.Types.InputPaidMediaPhoto_Or_InputPaidMediaVideo__InputPaidMediaVideo content ->
> encodeInputPaidMediaVideo content
3706,3707c3789,3795
< encodeInputProfilePhoto =
< Basics.identity
---
> encodeInputProfilePhoto rec =
> case rec of
> TelegramBotApi.Types.InputProfilePhotoAnimated_Or_InputProfilePhotoStatic__InputProfilePhotoAnimated content ->
> encodeInputProfilePhotoAnimated content
>
> TelegramBotApi.Types.InputProfilePhotoAnimated_Or_InputProfilePhotoStatic__InputProfilePhotoStatic content ->
> encodeInputProfilePhotoStatic content
3762,3763c3850,3856
< encodeInputStoryContent =
< Basics.identity
---
> encodeInputStoryContent rec =
> case rec of
> TelegramBotApi.Types.InputStoryContentPhoto_Or_InputStoryContentVideo__InputStoryContentPhoto content ->
> encodeInputStoryContentPhoto content
>
> TelegramBotApi.Types.InputStoryContentPhoto_Or_InputStoryContentVideo__InputStoryContentVideo content ->
> encodeInputStoryContentVideo content
4121,4122c4214,4220
< encodeMaybeInaccessibleMessage =
< Basics.identity
---
> encodeMaybeInaccessibleMessage rec =
> case rec of
> TelegramBotApi.Types.InaccessibleMessage_Or_Message__InaccessibleMessage content ->
> encodeInaccessibleMessage content
>
> TelegramBotApi.Types.InaccessibleMessage_Or_Message__Message content ->
> encodeMessage content
4126,4127c4224,4233
< encodeMenuButton =
< Basics.identity
---
> encodeMenuButton rec =
> case rec of
> TelegramBotApi.Types.MenuButtonCommands_Or_MenuButtonDefault_Or_MenuButtonWebApp__MenuButtonCommands content ->
> encodeMenuButtonCommands content
>
> TelegramBotApi.Types.MenuButtonCommands_Or_MenuButtonDefault_Or_MenuButtonWebApp__MenuButtonDefault content ->
> encodeMenuButtonDefault content
>
> TelegramBotApi.Types.MenuButtonCommands_Or_MenuButtonDefault_Or_MenuButtonWebApp__MenuButtonWebApp content ->
> encodeMenuButtonWebApp content
4676,4677c4782,4794
< encodeMessageOrigin =
< Basics.identity
---
> encodeMessageOrigin rec =
> case rec of
> TelegramBotApi.Types.MessageOriginChannel_Or_MessageOriginChat_Or_MessageOriginHiddenUser_Or_MessageOriginUser__MessageOriginChannel content ->
> encodeMessageOriginChannel content
>
> TelegramBotApi.Types.MessageOriginChannel_Or_MessageOriginChat_Or_MessageOriginHiddenUser_Or_MessageOriginUser__MessageOriginChat content ->
> encodeMessageOriginChat content
>
> TelegramBotApi.Types.MessageOriginChannel_Or_MessageOriginChat_Or_MessageOriginHiddenUser_Or_MessageOriginUser__MessageOriginHiddenUser content ->
> encodeMessageOriginHiddenUser content
>
> TelegramBotApi.Types.MessageOriginChannel_Or_MessageOriginChat_Or_MessageOriginHiddenUser_Or_MessageOriginUser__MessageOriginUser content ->
> encodeMessageOriginUser content
4793,4794c4910,4916
< encodeOwnedGift =
< Basics.identity
---
> encodeOwnedGift rec =
> case rec of
> TelegramBotApi.Types.OwnedGiftRegular_Or_OwnedGiftUnique__OwnedGiftRegular content ->
> encodeOwnedGiftRegular content
>
> TelegramBotApi.Types.OwnedGiftRegular_Or_OwnedGiftUnique__OwnedGiftUnique content ->
> encodeOwnedGiftUnique content
4914,4915c5036,5045
< encodePaidMedia =
< Basics.identity
---
> encodePaidMedia rec =
> case rec of
> TelegramBotApi.Types.PaidMediaPhoto_Or_PaidMediaPreview_Or_PaidMediaVideo__PaidMediaPhoto content ->
> encodePaidMediaPhoto content
>
> TelegramBotApi.Types.PaidMediaPhoto_Or_PaidMediaPreview_Or_PaidMediaVideo__PaidMediaPreview content ->
> encodePaidMediaPreview content
>
> TelegramBotApi.Types.PaidMediaPhoto_Or_PaidMediaPreview_Or_PaidMediaVideo__PaidMediaVideo content ->
> encodePaidMediaVideo content
4987,4988c5117,5144
< encodePassportElementError =
< Basics.identity
---
> encodePassportElementError rec =
> case rec of
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorDataField content ->
> encodePassportElementErrorDataField content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorFile content ->
> encodePassportElementErrorFile content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorFiles content ->
> encodePassportElementErrorFiles content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorFrontSide content ->
> encodePassportElementErrorFrontSide content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorReverseSide content ->
> encodePassportElementErrorReverseSide content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorSelfie content ->
> encodePassportElementErrorSelfie content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorTranslationFile content ->
> encodePassportElementErrorTranslationFile content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorTranslationFiles content ->
> encodePassportElementErrorTranslationFiles content
>
> TelegramBotApi.Types.OneOf1719152149__PassportElementErrorUnspecified content ->
> encodePassportElementErrorUnspecified content
5248,5249c5404,5413
< encodeReactionType =
< Basics.identity
---
> encodeReactionType rec =
> case rec of
> TelegramBotApi.Types.ReactionTypeCustomEmoji_Or_ReactionTypeEmoji_Or_ReactionTypePaid__ReactionTypeCustomEmoji content ->
> encodeReactionTypeCustomEmoji content
>
> TelegramBotApi.Types.ReactionTypeCustomEmoji_Or_ReactionTypeEmoji_Or_ReactionTypePaid__ReactionTypeEmoji content ->
> encodeReactionTypeEmoji content
>
> TelegramBotApi.Types.ReactionTypeCustomEmoji_Or_ReactionTypeEmoji_Or_ReactionTypePaid__ReactionTypePaid content ->
> encodeReactionTypePaid content
5407,5408c5571,5580
< encodeRevenueWithdrawalState =
< Basics.identity
---
> encodeRevenueWithdrawalState rec =
> case rec of
> TelegramBotApi.Types.RevenueWithdrawalStateFailed_Or_RevenueWithdrawalStatePending_Or_RevenueWithdrawalStateSucceeded__RevenueWithdrawalStateFailed content ->
> encodeRevenueWithdrawalStateFailed content
>
> TelegramBotApi.Types.RevenueWithdrawalStateFailed_Or_RevenueWithdrawalStatePending_Or_RevenueWithdrawalStateSucceeded__RevenueWithdrawalStatePending content ->
> encodeRevenueWithdrawalStatePending content
>
> TelegramBotApi.Types.RevenueWithdrawalStateFailed_Or_RevenueWithdrawalStatePending_Or_RevenueWithdrawalStateSucceeded__RevenueWithdrawalStateSucceeded content ->
> encodeRevenueWithdrawalStateSucceeded content
5635,5636c5807,5822
< encodeStoryAreaType =
< Basics.identity
---
> encodeStoryAreaType rec =
> case rec of
> TelegramBotApi.Types.StoryAreaTypeLink_Or_StoryAreaTypeLocation_Or_StoryAreaTypeSuggestedReaction_Or_StoryAreaTypeUniqueGift_Or_StoryAreaTypeWeather__StoryAreaTypeLink content ->
> encodeStoryAreaTypeLink content
>
> TelegramBotApi.Types.StoryAreaTypeLink_Or_StoryAreaTypeLocation_Or_StoryAreaTypeSuggestedReaction_Or_StoryAreaTypeUniqueGift_Or_StoryAreaTypeWeather__StoryAreaTypeLocation content ->
> encodeStoryAreaTypeLocation content
>
> TelegramBotApi.Types.StoryAreaTypeLink_Or_StoryAreaTypeLocation_Or_StoryAreaTypeSuggestedReaction_Or_StoryAreaTypeUniqueGift_Or_StoryAreaTypeWeather__StoryAreaTypeSuggestedReaction content ->
> encodeStoryAreaTypeSuggestedReaction content
>
> TelegramBotApi.Types.StoryAreaTypeLink_Or_StoryAreaTypeLocation_Or_StoryAreaTypeSuggestedReaction_Or_StoryAreaTypeUniqueGift_Or_StoryAreaTypeWeather__StoryAreaTypeUniqueGift content ->
> encodeStoryAreaTypeUniqueGift content
>
> TelegramBotApi.Types.StoryAreaTypeLink_Or_StoryAreaTypeLocation_Or_StoryAreaTypeSuggestedReaction_Or_StoryAreaTypeUniqueGift_Or_StoryAreaTypeWeather__StoryAreaTypeWeather content ->
> encodeStoryAreaTypeWeather content
5920,5921c6106,6127
< encodeTransactionPartner =
< Basics.identity
---
> encodeTransactionPartner rec =
> case rec of
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerAffiliateProgram content ->
> encodeTransactionPartnerAffiliateProgram content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerChat content ->
> encodeTransactionPartnerChat content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerFragment content ->
> encodeTransactionPartnerFragment content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerOther content ->
> encodeTransactionPartnerOther content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerTelegramAds content ->
> encodeTransactionPartnerTelegramAds content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerTelegramApi content ->
> encodeTransactionPartnerTelegramApi content
>
> TelegramBotApi.Types.OneOf4148445822__TransactionPartnerUser content ->
> encodeTransactionPartnerUser content
6786c6992,7002
< Json.Decode.value
---
> Json.Decode.oneOf
> [ Json.Decode.map
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillFreeformGradient
> decodeBackgroundFillFreeformGradient
> , Json.Decode.map
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillGradient
> decodeBackgroundFillGradient
> , Json.Decode.map
> TelegramBotApi.Types.BackgroundFillFreeformGradient_Or_BackgroundFillGradient_Or_BackgroundFillSolid__BackgroundFillSolid
> decodeBackgroundFillSolid
> ]
6799c7015,7035
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "freeform_gradient" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"freeform_gradient\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
6826a7063,7078
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "gradient" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"gradient\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
6828a7081
> )
6838c7091,7111
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "solid" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"solid\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
6843c7116,7129
< Json.Decode.value
---
> Json.Decode.oneOf
> [ Json.Decode.map
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeChatTheme
> decodeBackgroundTypeChatTheme
> , Json.Decode.map
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeFill
> decodeBackgroundTypeFill
> , Json.Decode.map
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypePattern
> decodeBackgroundTypePattern
> , Json.Decode.map
> TelegramBotApi.Types.BackgroundTypeChatTheme_Or_BackgroundTypeFill_Or_BackgroundTypePattern_Or_BackgroundTypeWallpaper__BackgroundTypeWallpaper
> decodeBackgroundTypeWallpaper
> ]
6853c7139,7159
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "chat_theme" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"chat_theme\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
6871a7178,7193
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "fill" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"fill\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
6873a7196
> )
6909a7233,7248
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "pattern" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"pattern\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
6911a7251
> )
6941a7282,7297
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "wallpaper" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"wallpaper\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
6943a7300
> )
6978c7335,7357
< Json.Decode.value
---
> Json.Decode.oneOf
> [ Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllChatAdministrators
> decodeBotCommandScopeAllChatAdministrators
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllGroupChats
> decodeBotCommandScopeAllGroupChats
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeAllPrivateChats
> decodeBotCommandScopeAllPrivateChats
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChat
> decodeBotCommandScopeChat
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChatAdministrators
> decodeBotCommandScopeChatAdministrators
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeChatMember
> decodeBotCommandScopeChatMember
> , Json.Decode.map
> TelegramBotApi.Types.OneOf3261166276__BotCommandScopeDefault
> decodeBotCommandScopeDefault
> ]
6987a7367,7382
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "all_chat_administrators" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"all_chat_administrators\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
6989a7385
> )
6998a7395,7410
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "all_group_chats" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"all_group_chats\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
7000a7413
> )
7009a7423,7438
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "all_private_chats" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"all_private_chats\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
7011a7441
> )
7021c7451,7471
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "chat" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"chat\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
7031c7481,7501
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "chat_administrators" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"chat_administrators\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
7043c7513,7533
< (Json.Decode.field "type" Json.Decode.string)
---
> (Json.Decode.field
> "type"
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "chat_member" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"chat_member\" got "
> ++ Json.Encode.encode
> 0
> (Json.Encode.string
> andThenUnpack
> )
> )
> )
> Json.Decode.string
> )
> )
7057a7548,7563
> (Json.Decode.andThen
> (\andThenUnpack ->
> if andThenUnpack == "default" then
> Json.Decode.succeed
> andThenUnpack
>
> else
> Json.Decode.fail
> ("Unexpected value: expected \"default\" got "
> ++ Json.Encode.encode
> 0
> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Make the schema types more restrictive, this is in preparation of support for smarter
anyOfchecks