!"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~SafeA type alias for postback data.A type alias to specify a channel access token. About issueing and using the channel access token, please refer to corresponding LINE documentations.A type alias to specify a channel secret. About issueing and using the channel secret, please refer to corresponding LINE documentations.A type alias to specify a URL.3A type alias to specify an identifier of something.None/9;AT3An error body type.[It contains error message, and may contain property information and detailed error bodies. *An error type possibly returned from the  !./Line-Messaging-API.html#t:APIIOAPIIO type.}State code errors may contain a parsed error body. Other types of errors, which may rarely occur if used properly, does not.2For more details of error types, please refer to  (https://devdocs.line.me/en/#status-codes Status codes and  *https://devdocs.line.me/en/#error-responseError response% sections in the LINE documentation. M400 Bad Request with a parsed error body, caused by badly formatted request. K401 Unauthorized with a parsed error body, caused by invalid access token. P403 Forbidden with a parsed error body, caused by unauthorized account or plan.I429 Too Many Requests with a parsed error body, caused by exceeding the  'https://devdocs.line.me/en/#rate-limits rate limit.3500 Internal Server Error with a parsed error body.hCaused by status codes other than 200 and listed statuses above, with the status code and request body.2Caused by badly formatted response body from APIs.Any other exception caught as .%A type to represent a user's profile.It is the return type of the  &./Line-Messaging-API.html#v:getProfile getProfile API in the Line.Messaging.API module.*A data type for possible template actions.vEach action object represents a button in template message. A button has a label and an actual action fired by click.rMessage action. When clicked, a specified text will be sent into the same room by a user who clicked the button.Postback action. When clicked, a specified text will be sent, and postback data will be sent to webhook server as a postback event.[URI action. When clicked, a web page with a specified URI will open in the in-app browser.Just a type alias for  , used with .%Actual contents of carousel template.It has the same fields as +0, except that the number of actions is up to 3. URL for thumbnail image! Title text"Description text#GA list of template actions, each of which represents a button (max: 3)$/The carousel content type for template message. +https://devdocs.line.me/images/carousel.pngCarousel template5For more details of each field, please refer to the  $https://devdocs.line.me/en/#carouselCarousel$ section in the LINE documentation.&)A list of columns for a carousel template'.The confirm content type for template message. *https://devdocs.line.me/images/confirm.pngConfirm template5For more details of each field, please refer to the  #https://devdocs.line.me/en/#confirmConfirm$ section in the LINE documentation.) Confirm text*GA list of template actions, each of which represents a button (max: 2)+.The buttons content type for template message. *https://devdocs.line.me/images/buttons.pngButtons template5For more details of each field, please refer to the  #https://devdocs.line.me/en/#buttonsButtons$ section in the LINE documentation.-URL for thumbnail image. Title text/Description text0GA list of template actions, each of which represents a button (max: 4)1Z for template data.It has a type parameter tD which means a template content type. The type is polymolphic, but Z instances are defined only for +, ', and $.PAbout how to send template message and what each field means, please refer to  -https://devdocs.line.me/en/#template-messagestemplate message spec.34Alt text for devices not supporting template message4Template content type53A type representing a tappable area in an image map;Each component means (x, y, width, height) correspondingly.6KA type representing actions when a specific area of an image map is tapped.-It contains action data and area information.7'Open a web page when an area is tapped.85Send a text message from the user who tapped an area.9Z for image map data.TAbout how to send an image map message and what each field means, please refer to  ,https://devdocs.line.me/en/#imagemap-messageimage map message spec.; $https://devdocs.line.me/en/#base-urlBase URL of images<-Alt text for devices not supporting image map=Image size tuple, (width, height) specifically. The width to be set to 1040, the height to be set to the value corresponding to a width of 1040.>/Actions to be executed when each area is tapped?Z for sticker data.SIt contains its package and sticker ID. Its corresponding JSON spec is described  #https://devdocs.line.me/en/#stickerhere.xThis type is also used to decode sticker event message from webhook request. About the webhook usage, please refer to  2./Line-Messaging-Webhook-Types.html#t:EventMessage EventMessage in Line.Messaging.Webhook.Types.CZ for location data.tIt contains a title, address, and geographic coordination of a location. Its corresponding JSON spec is described  $https://devdocs.line.me/en/#locationhere.yThis type is also used to decode location event message from webhook request. About the webhook usage, please refer to  2./Line-Messaging-Webhook-Types.html#t:EventMessage EventMessage in Line.Messaging.Webhook.Types.IZ for audio data.lIt contains a URL of an audio, and its duration in milliseconds. Its corresponding JSON spec is described  !https://devdocs.line.me/en/#audiohere.MZ for video data.aIt contains URLs of an original video and its preview. Its corresponding JSON spec is described  !https://devdocs.line.me/en/#videohere.QZ for image data.aIt contains URLs of an original image and its preview. Its corresponding JSON spec is described  !https://devdocs.line.me/en/#imagehere.UZ for text data. It contains  of  Data.Text,. Its corresponding JSON spec is described  https://devdocs.line.me/en/#texthere.uThis type is also used to decode text event message from webhook request. About the webhook usage, please refer to  2./Line-Messaging-Webhook-Types.html#t:EventMessage EventMessage in Line.Messaging.Webhook.Types.X)A type representing a message to be sent.The data constructor converts Z into X . It allows different types of Z& to be sent through a single API call.An example usage is like below. _pushTextAndImage :: ID -> APIIO () pushTextAndImage identifier = push identifier [ Message $ U "hello", Message $ Q " https://example.com/image.jpg" " https://example.com/preview.jpg" ] Z5A type class representing types to be converted into X.It has toType and toObject as its minimal complete definition, but it is not recommended to define any extra instance, as the new type may not work with the LINE APIs.About existing messageable types, please refer to the following instances. Each instance is matched with a message object described in  /https://devdocs.line.me/en/#send-message-objectthe LINE documentation.r  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnop[  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZVZXYUVWQRSTMNOPIJKLCDEFGH?@AB9:;<=>67851234+,-./0'()*$%& !"#  .   !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopNoneRepresent beacon data."Represent message types sent with 0. It can be retrieved from message events with .vThere is no actual content body sent with image, video and audio messages. It should be manually downloaded via the  &./Line-Messaging-API.html#v:getContent getContent API.9For more details of event messages, please refer to the  )https://devdocs.line.me/en/#message-event Message event$ section of the LINE documentation.Text event message.Image event message.Video event message.Audio event message.Location event message.Sticker event message.LA source from which an event is sent. It can be retrieved from events with .0A type alias to represent a non-replyable event.,A type alias to represent a replyable event.:A type alias for reply token. It is also consumed by the  !./Line-Messaging-API.html#v:replyreply API.RThe base type for an event. It is a type alias for 4-tuple containing event data.The type variable r is for a reply token, which is ()9 in the case of non-replyable events. The type variable a is a content type, which is () for events without content.fA type to represent each webhook event. The type of an event can be determined with pattern matching. `handleEvent :: Event -> IO () handleEvent (MessageEvent event) = handleMessageEvent event handleEvent (BeaconEvent event) = handleBeaconEvent event handleEvent _ = return () handleMessageEvent :: ReplyableEvent EventMessage -> IO () handleMessageEvent = undefined handleBeaconEvent :: ReplyableEvent BeaconData -> IO () handleBeaconEvent = undefined 'All the data contstructors have a type  r a -> .*This type represents a whole request body.QIt is mainly for JSON parsing, and users may not need to use this type directly.<A failure type returned when a webhook request is malformed. When the signature is not valid.AWhen the request body cannot be decoded into defined event types. A type alias for auth signature. It is set as X-Line-Signature header in webhook requests$Retrieve event source from an event.%Retrieve datetime when event is sent.=Retrieve a reply token of an event. It can be used only for .aRetrieve event message from an event. It can be used only for events whose content is a message. handleMessageEvent :: ReplyableEvent EventMessage -> IO () handleMessageEvent event = do let message = getMessage event print message eRetrieve postback data from an event. It can be used only for events whose content is postback data. import qualified Data.Text.IO as TIO handlePostbackEvent :: ReplyableEvent Postback -> IO () handlePostbackEvent event = do let postback = getPostback event TIO.putStrLn postback aRetrieve beacon data from an event. It can be used only for events whose content is beacon data. handleBeaconEvent :: ReplyableEvent BeaconData -> IO () handleBeaconEvent event = do let beaconData = getBeacon event print beaconData %Retrieve identifier from event sourceGet hardware ID of the beacon..Get device message from the beacon, if exists.//*None  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZNoneProvided a channel secret, request body and auth signature, it determines the request is properly signatured, which probably means it is sent from a valid LINE server.=For more details of webhook authentication, please refer to  2https://devdocs.line.me/en/#webhook-authenticationthe LINE documentation.NoneA basic webhook function. It validates a request with a channel secret, signature and body, and parses the body into a list of webhook events.1To handle failures, the result is in the form of  .#A webhook handler for WAI. It uses  internally and returns a WAI .7An example webhook server using WAI will be like below: vapp :: Application app req f = case pathInfo req of "webhook" : _ -> do secret <- getChannelSecret webhookApp secret handler defaultOnFailure req f _ -> undefined handler :: [Event] -> IO () handler events = forM_ events handleEvent handleEvent :: Event -> IO () handleEvent (MessageEvent event) = undefined -- handle a message event handleEvent _ = return () &A basic error handler to be used with '. It returns 400 Bad Request with the  code for its body.&A webhook handler for Scotty. It uses 1 internally and returns a Scotty action of type ActionM ()7An example webhook server using WAI will be like below: )main :: IO () main = scotty 3000 $ do post "/webhook" $ webhookAction handler defaultOnFailure' handler :: [Event] -> IO () handler events = forM_ events handleEvent handleEvent :: Event -> IO () handleEvent (MessageEvent event) = undefined -- handle a message event handleEvent _ = return () &A basic error handler to be used with '. It returns 400 Bad Request with the 0 code for its body. It has the same purpose as , except that it is for Scotty. Request bodyAuth signature in X-Line-Signature headerChannel secret Event handler4Error handler. Just to return 400 for failures, use .Channel secret Event handler4Error handler. Just to return 400 for failures, use .4None WA monad transformer for API calls. If translated into a human-readable form, it means: gAn API call needs a channel access token to specify through which channel it should send the call ( ).8An API call effectfully returns a result if successful,   otherwise (  ). resolves the / monad transformer, and turns it into a plain  with  provided.2The reason the type of the first parameter is not , but  v, is that it is usually loaded via effectful actions such as parsing command line arguments or reading a config file.An example usage is like below: api :: APIIO a -> IO (Either APIError a) api = runAPI getChannelAccessTokenFromConfig main :: IO () main = do result <- api $ push "some_receiver_id" [ Message $ Text "Hello, world!" ] case result of Right _ -> return () Left err -> print err \Push messages into a receiver. The receiver can be a user, a room or a group, specified by .A XT represents a message object. For types of the message object, please refer to the  /https://devdocs.line.me/en/#send-message-objectSend message object$ section of the LINE documentation.An example usage of X is like below: -messages :: [Message] messages = [ Message $ Q, imageURL previewURL , Message $ U( "hello, world!" , Message $ 1 "an example template" Confirm "a confirm template" [ TplMessageAction "ok label" "print this" , TplURIAction "link label" linkURL ] ] 5For more information about the API, please refer to  (https://devdocs.line.me/en/#push-messagethe API reference.,Send messages to multiple users at any time.+Messages cannot be sent to groups or rooms.'For more information, please refer to  %https://devdocs.line.me/en/#multicastits API reference.3Send messages as a reply to specific webhook event.It works similarly to how s does for messages, except that it can only reply through a specific reply token. The token can be obtained from  4./Line-Messaging-Webhook-Types.html#t:ReplyableEventreplyable events on a webhook server.'For more information, please refer to  )https://devdocs.line.me/en/#reply-messageits API reference.9Get content body of images, videos and audios sent with  2./Line-Messaging-Webhook-Types.html#t:EventMessageevent messages, specified by .KIn the event messages, the content body is not included. Users should use 9 to downloaded the content only when it is really needed.'For more information, please refer to  'https://devdocs.line.me/en/#get-contentits API reference.&Get a profile of a user, specified by .(The user identifier can be obtained via  1./Line-Messaging-Webhook-Types.html#t:EventSource EventSource.'For more information, please refer to  /https://devdocs.line.me/en/#bot-api-get-profileits API reference.Leave a room, specified by .'For more information, please refer to  !https://devdocs.line.me/en/#leaveits API reference.Leave a group, specified by .'For more information, please refer to  !https://devdocs.line.me/en/#leaveits API reference.d  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ        !"#$$%&'())*++,-../01233456789::;<=>??@ABBCDEFGGHIJJKLMMNOPPQRRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~P!line-3.0.1-D4CzdcH8MXfBtSDhC21GDoLine.Messaging.Common.TypesLine.Messaging.API.TypesLine.Messaging.Webhook.Types!Line.Messaging.Webhook.ValidationLine.Messaging.WebhookLine.Messaging.APILine.Messaging.TypesPostbackChannelAccessToken ChannelSecretURLID APIErrorBodygetErrorMessagegetErrorPropertygetErrorDetailsAPIError BadRequest Unauthorized ForbiddenTooManyRequestsInternalServerErrorUndefinedStatusCodeJSONDecodeErrorUndefinedErrorProfile getUserIDgetDisplayName getPictureURLgetStatusMessageTemplateActionTplMessageActionTplPostbackAction TplURIActionLabelColumngetColumnThumbnailURLgetColumnTitle getColumnTextgetColumnActionsCarousel getColumnsConfirmgetConfirmTextgetConfirmActionsButtonsgetButtonsThumbnailURLgetButtonsTitlegetButtonsTextgetButtonsActionsTemplategetTemplateAltText getTemplate ImageMapAreaImageMapAction IMURIActionIMMessageActionImageMapgetBaseImageURL getIMAltTextgetBaseImageSize getIMActionsSticker getPackageID getStickerIDLocationgetLocationTitle getAddress getLatitude getLongitudeAudio getAudioURLgetAudioDurationVideo getVideoURLgetVideoPreviewURLImage getImageURLgetImagePreviewURLTextgetTextMessage Messageable$fFromJSONAPIErrorBody$fFromJSONProfile$fToJSONTemplateAction$fToJSONColumn$fToJSONCarousel$fToJSONConfirm$fToJSONButtons$fMessageableTemplate$fMessageableTemplate0$fMessageableTemplate1$fToJSONImageMapAction$fMessageableImageMap$fMessageableSticker$fFromJSONSticker$fMessageableLocation$fFromJSONLocation$fMessageableAudio$fMessageableVideo$fMessageableImage$fMessageableText$fFromJSONText$fToJSONMessage$fEqText $fOrdText $fShowText $fEqImage $fShowImage $fEqVideo $fShowVideo $fEqAudio $fShowAudio $fEqLocation$fShowLocation $fEqSticker $fShowSticker$fEqImageMapAction$fShowImageMapAction $fEqImageMap$fShowImageMap $fEqTemplate$fShowTemplate$fEqTemplateAction$fShowTemplateAction $fEqColumn $fShowColumn $fEqCarousel$fShowCarousel $fEqConfirm $fShowConfirm $fEqButtons $fShowButtons $fEqProfile $fShowProfile$fEqAPIErrorBody$fShowAPIErrorBody$fShowAPIError $fShowMessage BeaconData BeaconEnter BeaconLeave BeaconBanner EventMessageTextEMImageEMVideoEMAudioEM LocationEM StickerEM EventSourceUserGroupRoomNonReplyableEventReplyableEvent ReplyToken EventTupleEvent MessageEvent FollowEvent UnfollowEvent JoinEvent LeaveEvent PostbackEvent BeaconEventBodyWebhookFailureSignatureVerificationFailedMessageDecodeFailed Signature getSource getDatetime getReplyToken getMessage getPostback getBeacongetIDgetHWIDgetDeviceMessage$fFromJSONBeaconData$fFromJSONEventMessage$fFromJSONEventSource$fFromJSONEvent$fFromJSONBody$fEqWebhookFailure$fShowWebhookFailure$fEqEventSource$fShowEventSource$fEqEventMessage$fShowEventMessage$fEqBeaconData$fShowBeaconData $fEqEvent $fShowEvent$fEqBody $fShowBodyvalidateSignaturewebhook webhookAppdefaultOnFailure webhookActiondefaultOnFailure'APIIOrunAPIpush multicastreply getContent getProfile leaveRoom leaveGroupbase GHC.Exception SomeException#text-1.2.2.1-Ji7hMs2U4BkBwavd4taEVRData.Text.InternaltoTypetoObjecttoValue toAreaJSON templateTypetemplateToObjecttransformers-0.5.2.0Control.Monad.Trans.ExceptExceptT"wai-3.2.1.1-H6cJdoNnPqk1Ch333qtaPo Network.Wai ApplicationgetSigFromWaiReqControl.Monad.Trans.ReaderReaderTghc-prim GHC.TypesIO createReq handleErrorrunReqgetpostleave