@line/bot-sdk
Advanced tools
Comparing version 6.1.1 to 6.2.0
@@ -0,1 +1,13 @@ | ||
## 6.2.0 (15 Aug 2018) | ||
#### Type | ||
* Add QuickReply types (#83) | ||
* Format type comments | ||
#### Misc | ||
* Upgrade TypeScript to 3 | ||
## 6.1.1 (14 Aug 2018) | ||
@@ -2,0 +14,0 @@ |
@@ -27,8 +27,8 @@ /// <reference types="node" /> | ||
getRichMenuList(): Promise<Array<Types.RichMenuResponse>>; | ||
private authHeader(); | ||
private delete(url); | ||
private get(url); | ||
private post(url, body?); | ||
private postBinary(url, data, contentType?); | ||
private stream(url); | ||
private authHeader; | ||
private delete; | ||
private get; | ||
private post; | ||
private postBinary; | ||
private stream; | ||
} |
export declare class SignatureValidationFailed extends Error { | ||
signature: string; | ||
signature?: string; | ||
constructor(message: string, signature?: string); | ||
@@ -4,0 +4,0 @@ } |
@@ -24,5 +24,9 @@ export interface Config { | ||
export declare type EventBase = { | ||
/** Time of the event in milliseconds */ | ||
/** | ||
* Time of the event in milliseconds | ||
*/ | ||
timestamp: number; | ||
/** Source user, group, or room object with information about the source of the event. */ | ||
/** | ||
* Source user, group, or room object with information about the source of the event. | ||
*/ | ||
source: EventSource; | ||
@@ -40,4 +44,6 @@ }; | ||
* ID of the source user. | ||
* | ||
* Only included in [message events](https://developers.line.me/en/reference/messaging-api/#message-event). | ||
* Not included if the user has not agreed to the [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
* Not included if the user has not agreed to the | ||
* [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
*/ | ||
@@ -51,4 +57,6 @@ userId?: string; | ||
* ID of the source user. | ||
* | ||
* Only included in [message events](https://developers.line.me/en/reference/messaging-api/#message-event). | ||
* Not included if the user has not agreed to the [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
* Not included if the user has not agreed to the | ||
* [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
*/ | ||
@@ -62,4 +70,6 @@ userId?: string; | ||
* Webhook event object which contains the sent message. | ||
* The `message` property contains a message object which corresponds with the message type. You can reply to message events. | ||
* | ||
* The `message` property contains a message object which corresponds with the | ||
* message type. You can reply to message events. | ||
* | ||
* @see [Message event](https://developers.line.me/en/reference/messaging-api/#message-event) | ||
@@ -73,3 +83,2 @@ */ | ||
* Event object for when your account is added as a friend (or unblocked). | ||
* You can reply to follow events. | ||
*/ | ||
@@ -91,3 +100,5 @@ export declare type FollowEvent = { | ||
* - For groups: A join event is sent when a user invites your bot. | ||
* - For rooms: A join event is sent when the first event (for example when a user sends a message or is added to the room) occurs after your bot is added. | ||
* - For rooms: A join event is sent when the first event (for example when a | ||
* user sends a message or is added to the room) occurs after your bot is | ||
* added. | ||
*/ | ||
@@ -98,3 +109,3 @@ export declare type JoinEvent = { | ||
/** | ||
* Event object for when a user removes your bot from a [group](https://developers.line.me/en/docs/messaging-api/group-chats/#group) or when your bot leaves a [group](https://developers.line.me/en/docs/messaging-api/group-chats/#group) or [room](https://developers.line.me/en/docs/messaging-api/group-chats/#room). | ||
* Event object for when a user removes your bot from a group or a room. | ||
*/ | ||
@@ -105,4 +116,4 @@ export declare type LeaveEvent = { | ||
/** | ||
* Event object for when a user performs an action on a [template message](https://developers.line.me/en/reference/messaging-api/#template-messages) which initiates a postback. | ||
* You can reply to postback events. | ||
* Event object for when a user performs an action on a | ||
* [template message](https://developers.line.me/en/reference/messaging-api/#template-messages). | ||
*/ | ||
@@ -114,4 +125,4 @@ export declare type PostbackEvent = { | ||
/** | ||
* Event object for when a user enters or leaves the range of a [LINE Beacon](https://developers.line.me/en/docs/messaging-api/using-beacons/). | ||
* You can reply to beacon events. | ||
* Event object for when a user enters or leaves the range of a | ||
* [LINE Beacon](https://developers.line.me/en/docs/messaging-api/using-beacons/). | ||
*/ | ||
@@ -128,5 +139,7 @@ export declare type BeaconEvent = ReplyableEvent & { | ||
* Device message of beacon that was detected. | ||
* | ||
* This message consists of data generated by the beacon to send notifications to bots. | ||
* Only included in webhooks from devices that support the "device message" property. | ||
* For more information, see the [LINE Simple Beacon specification](https://github.com/line/line-simple-beacon/blob/master/README.en.md/#line-simple-beacon-frame). | ||
* For more information, see the | ||
* [LINE Simple Beacon specification](https://github.com/line/line-simple-beacon/blob/master/README.en.md/#line-simple-beacon-frame). | ||
*/ | ||
@@ -189,3 +202,4 @@ dm?: string; | ||
* Message object which contains the sticker data sent from the source. | ||
* For a list of basic LINE stickers and sticker IDs, see [sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For a list of basic LINE stickers and sticker IDs, see | ||
* [sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -200,5 +214,8 @@ export declare type StickerEventMessage = { | ||
/** | ||
* Object with the date and time selected by a user through a [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* Only returned for postback actions via a [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* The `full-date`, `time-hour`, and `time-minute` formats follow the [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt). | ||
* Object with the date and time selected by a user through a | ||
* [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* Only returned for postback actions via a | ||
* [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* The `full-date`, `time-hour`, and `time-minute` formats follow the | ||
* [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt). | ||
*/ | ||
@@ -227,5 +244,19 @@ params?: { | ||
/** | ||
* @see [Common properties for messages](https://developers.line.me/en/reference/messaging-api/#common-properties-for-messages) | ||
*/ | ||
export declare type MessageCommon = { | ||
/** | ||
* For the quick reply feature. | ||
* For more information, see [Using quick replies](https://developers.line.me/en/docs/messaging-api/using-quick-reply/). | ||
* | ||
* If the user receives multiple | ||
* [message objects](https://developers.line.me/en/reference/messaging-api/#message-objects), | ||
* the quickReply property of the last message object is displayed. | ||
*/ | ||
quickReply?: QuickReply; | ||
}; | ||
/** | ||
* @see [Text message](https://developers.line.me/en/reference/messaging-api/#text-message) | ||
*/ | ||
export declare type TextMessage = { | ||
export declare type TextMessage = MessageCommon & { | ||
type: "text"; | ||
@@ -236,3 +267,4 @@ /** | ||
* - Unicode emoji | ||
* - LINE original emoji ([Unicode codepoint table for LINE original emoji](https://developers.line.me/media/messaging-api/emoji-list.pdf)) | ||
* - LINE original emoji | ||
* ([Unicode codepoint table for LINE original emoji](https://developers.line.me/media/messaging-api/emoji-list.pdf)) | ||
* | ||
@@ -246,3 +278,3 @@ * Max: 2000 characters | ||
*/ | ||
export declare type ImageMessage = { | ||
export declare type ImageMessage = MessageCommon & { | ||
type: "image"; | ||
@@ -271,3 +303,3 @@ /** | ||
*/ | ||
export declare type VideoMessage = { | ||
export declare type VideoMessage = MessageCommon & { | ||
type: "video"; | ||
@@ -298,3 +330,3 @@ /** | ||
*/ | ||
export declare type AudioMessage = { | ||
export declare type AudioMessage = MessageCommon & { | ||
type: "audio"; | ||
@@ -318,3 +350,3 @@ /** | ||
*/ | ||
export declare type LocationMessage = { | ||
export declare type LocationMessage = MessageCommon & { | ||
type: "location"; | ||
@@ -335,7 +367,8 @@ /** | ||
*/ | ||
export declare type StickerMessage = { | ||
export declare type StickerMessage = MessageCommon & { | ||
type: "sticker"; | ||
/** | ||
* Package ID for a set of stickers. | ||
* For information on package IDs, see the [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For information on package IDs, see the | ||
* [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -345,3 +378,5 @@ packageId: string; | ||
* Sticker ID. | ||
* For a list of sticker IDs for stickers that can be sent with the Messaging API, see the [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For a list of sticker IDs for stickers that can be sent with the Messaging | ||
* API, see the | ||
* [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -353,6 +388,7 @@ stickerId: string; | ||
*/ | ||
export declare type ImageMapMessage = { | ||
export declare type ImageMapMessage = MessageCommon & { | ||
type: "imagemap"; | ||
/** | ||
* [Base URL](https://developers.line.me/en/reference/messaging-api/#base-url) of image (Max: 1000 characters, **HTTPS**) | ||
* [Base URL](https://developers.line.me/en/reference/messaging-api/#base-url) of image | ||
* (Max: 1000 characters, **HTTPS**) | ||
*/ | ||
@@ -371,3 +407,5 @@ baseUrl: string; | ||
/** | ||
* Template messages are messages with predefined layouts which you can customize. For more information, see [template messages](https://developers.line.me/en/docs/messaging-api/message-types/#template-messages). | ||
* Template messages are messages with predefined layouts which you can | ||
* customize. For more information, see | ||
* [template messages](https://developers.line.me/en/docs/messaging-api/message-types/#template-messages). | ||
* | ||
@@ -383,3 +421,3 @@ * The following template types are available: | ||
*/ | ||
export declare type TemplateMessage = { | ||
export declare type TemplateMessage = MessageCommon & { | ||
type: "template"; | ||
@@ -391,3 +429,3 @@ /** | ||
/** | ||
* A [Buttons](https://developers.line.me/en/reference/messaging-api/#buttons), [Confirm](https://developers.line.me/en/reference/messaging-api/#confirm), [Carousel](https://developers.line.me/en/reference/messaging-api/#carousel), or [Image Carousel](https://developers.line.me/en/reference/messaging-api/#image-carousel) object. | ||
* Carousel template content | ||
*/ | ||
@@ -399,7 +437,8 @@ template: TemplateContent; | ||
* You can customize the layout freely by combining multiple elements. | ||
* For more information, see [Using Flex Messages](https://developers.line.me/en/docs/messaging-api/using-flex-messages/). | ||
* For more information, see | ||
* [Using Flex Messages](https://developers.line.me/en/docs/messaging-api/using-flex-messages/). | ||
* | ||
* @see [Flex messages](https://developers.line.me/en/reference/messaging-api/#flex-message) | ||
*/ | ||
export declare type FlexMessage = { | ||
export declare type FlexMessage = MessageCommon & { | ||
type: "flex"; | ||
@@ -412,3 +451,4 @@ altText: string; | ||
* | ||
* When a region is tapped, the user is redirected to the URI specified in `uri` and the message specified in `message` is sent. | ||
* When a region is tapped, the user is redirected to the URI specified in | ||
* `uri` and the message specified in `message` is sent. | ||
* | ||
@@ -460,8 +500,12 @@ * @see [Imagemap action objects](https://developers.line.me/en/reference/messaging-api/#imagemap-action-objects) | ||
* | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) for the containers' JSON data samples and usage. | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) | ||
* for the containers' JSON data samples and usage. | ||
*/ | ||
export declare type FlexContainer = FlexBubble | FlexCarousel; | ||
/** | ||
* This is a container that contains one message bubble. It can contain four blocks: header, hero, body, and footer. | ||
* For more information about using each block, see [Block](https://developers.line.me/en/docs/messaging-api/flex-message-elements/#block). | ||
* This is a container that contains one message bubble. It can contain four | ||
* blocks: header, hero, body, and footer. | ||
* | ||
* For more information about using each block, see | ||
* [Block](https://developers.line.me/en/docs/messaging-api/flex-message-elements/#block). | ||
*/ | ||
@@ -471,3 +515,4 @@ export declare type FlexBubble = { | ||
/** | ||
* Text directionality and the order of components in horizontal boxes in the container. Specify one of the following values: | ||
* Text directionality and the order of components in horizontal boxes in the | ||
* container. Specify one of the following values: | ||
* | ||
@@ -498,5 +543,6 @@ * - `ltr`: Left to right | ||
/** | ||
* `true` to place a separator above the block. | ||
* `true` will be ignored for the first block in a container because you cannot place a separator above the first block. | ||
* The default value is `false`. | ||
* - `true` to place a separator above the block. | ||
* - `true` will be ignored for the first block in a container because you | ||
* cannot place a separator above the first block. | ||
* - The default value is `false`. | ||
*/ | ||
@@ -517,3 +563,4 @@ separator?: boolean; | ||
/** | ||
* Components are objects that compose a Flex Message container. Here are the types of components available: | ||
* Components are objects that compose a Flex Message container. Here are the | ||
* types of components available: | ||
* | ||
@@ -529,3 +576,6 @@ * - [Box](https://developers.line.me/en/reference/messaging-api/#box) | ||
* | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) and [Flex Message layout](https://developers.line.me/en/docs/messaging-api/flex-message-layout/) for the components' JSON data samples and usage. | ||
* See the followings for the components' JSON data samples and usage. | ||
* | ||
* - [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) | ||
* - [Flex Message layout](https://developers.line.me/en/docs/messaging-api/flex-message-layout/) | ||
*/ | ||
@@ -542,7 +592,11 @@ export declare type FlexComponent = FlexBox | FlexButton | FlexFiller | FlexIcon | FlexImage | FlexSeparator | FlexSpacer | FlexText; | ||
* | ||
* - `horizontal`: Components are placed horizontally. The `direction` property of the [bubble](https://developers.line.me/en/reference/messaging-api/#bubble) container specifies the order. | ||
* - `horizontal`: Components are placed horizontally. The `direction` | ||
* property of the [bubble](https://developers.line.me/en/reference/messaging-api/#bubble) | ||
* container specifies the order. | ||
* - `vertical`: Components are placed vertically from top to bottom. | ||
* - `baseline`: Components are placed in the same way as `horizontal` is specified except the baselines of the components are aligned. | ||
* - `baseline`: Components are placed in the same way as `horizontal` is | ||
* specified except the baselines of the components are aligned. | ||
* | ||
* For more information, see [Types of box layouts](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#box-layout-types). | ||
* For more information, see | ||
* [Types of box layouts](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#box-layout-types). | ||
*/ | ||
@@ -554,11 +608,21 @@ layout: "horizontal" | "vertical" | "baseline"; | ||
* - When the `layout` property is `horizontal` or `vertical`: | ||
* [Box](https://developers.line.me/en/reference/messaging-api/#box), [button](https://developers.line.me/en/reference/messaging-api/#button), [filler](https://developers.line.me/en/reference/messaging-api/#filler), [image](https://developers.line.me/en/reference/messaging-api/#f-image), [separator](https://developers.line.me/en/reference/messaging-api/#separator), and [text](https://developers.line.me/en/reference/messaging-api/#f-text) components | ||
* + [Box](https://developers.line.me/en/reference/messaging-api/#box) | ||
* + [button](https://developers.line.me/en/reference/messaging-api/#button) | ||
* + [filler](https://developers.line.me/en/reference/messaging-api/#filler) | ||
* + [image](https://developers.line.me/en/reference/messaging-api/#f-image) | ||
* + [separator](https://developers.line.me/en/reference/messaging-api/#separator) | ||
* + [text](https://developers.line.me/en/reference/messaging-api/#f-text) | ||
* - When the `layout` property is `baseline`: | ||
* [filler](https://developers.line.me/en/reference/messaging-api/#filler), [icon](https://developers.line.me/en/reference/messaging-api/#icon), and [text](https://developers.line.me/en/reference/messaging-api/#f-text) components | ||
* + [filler](https://developers.line.me/en/reference/messaging-api/#filler) | ||
* + [icon](https://developers.line.me/en/reference/messaging-api/#icon) | ||
* + [text](https://developers.line.me/en/reference/messaging-api/#f-text) | ||
*/ | ||
contents: FlexComponent[]; | ||
/** | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* The ratio of the width or height of this box within the parent box. The | ||
* default value for the horizontal parent box is `1`, and the default value | ||
* for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
@@ -568,5 +632,8 @@ flex?: number; | ||
* Minimum space between components in this box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is `none`. | ||
* To override this setting for a specific component, set the `margin` property of that component. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is `none`. | ||
* - To override this setting for a specific component, set the `margin` | ||
* property of that component. | ||
*/ | ||
@@ -576,5 +643,9 @@ spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -584,2 +655,3 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
@@ -591,2 +663,3 @@ */ | ||
* This component draws a button. | ||
* | ||
* When the user taps a button, a specified action is performed. | ||
@@ -598,2 +671,3 @@ */ | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
@@ -604,4 +678,8 @@ */ | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
@@ -611,5 +689,9 @@ flex?: number; | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -632,5 +714,6 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
/** | ||
* Character color when the `style` property is `link`. | ||
* Background color when the `style` property is `primary` or `secondary`. | ||
* Use a hexadecimal color code. | ||
* | ||
* - Character color when the `style` property is `link`. | ||
* - Background color when the `style` property is `primary` or `secondary`. | ||
*/ | ||
@@ -647,3 +730,4 @@ color?: string; | ||
* | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` property will be ignored. | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` | ||
* property will be ignored. | ||
*/ | ||
@@ -676,6 +760,11 @@ gravity?: "top" | "bottom" | "center"; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -710,11 +799,20 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* - For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
flex?: number; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -758,4 +856,7 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* | ||
* - `cover`: The image fills the entire drawing area. Parts of the image that do not fit in the drawing area are not displayed. | ||
* - `fit`: The entire image is displayed in the drawing area. The background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire drawing area. Parts of the image | ||
* that do not fit in the drawing area are not displayed. | ||
* - `fit`: The entire image is displayed in the drawing area. The background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -781,6 +882,11 @@ * The default value is `fit`. | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -794,3 +900,4 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
/** | ||
* This is an invisible component that places a fixed-size space at the beginning or end of the box. | ||
* This is an invisible component that places a fixed-size space at the | ||
* beginning or end of the box. | ||
*/ | ||
@@ -811,11 +918,20 @@ export declare type FlexSpacer = { | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
flex?: number; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -848,3 +964,4 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` property will be ignored. | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` | ||
* property will be ignored. | ||
*/ | ||
@@ -854,10 +971,13 @@ gravity?: "top" | "bottom" | "center"; | ||
* `true` to wrap text. | ||
* | ||
* The default value is `false`. | ||
* If set to `true`, you can use a new line character (\n) to begin on a new line. | ||
* | ||
* If set to `true`, you can use a new line character (\n) to begin on a new | ||
* line. | ||
*/ | ||
wrap?: boolean; | ||
/** | ||
* Max number of lines. If the text does not fit in the specified number of lines, | ||
* an ellipsis (…) is displayed at the end of the last line. | ||
* If set to 0, all the text is displayed. The default value is 0. | ||
* Max number of lines. If the text does not fit in the specified number of | ||
* lines, an ellipsis (…) is displayed at the end of the last line. If set to | ||
* 0, all the text is displayed. The default value is 0. | ||
*/ | ||
@@ -885,4 +1005,6 @@ maxLines?: number; | ||
* | ||
* Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for buttons template messages, the lower | ||
* part of the text display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
*/ | ||
@@ -912,4 +1034,7 @@ export declare type TemplateButtons = { | ||
* | ||
* - `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire image area. Parts of the image that | ||
* do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -943,4 +1068,6 @@ * The default value is `cover`. | ||
* | ||
* Because of the height limitation for confirm template messages, the lower part of the `text` display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for confirm template messages, the lower | ||
* part of the `text` display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
*/ | ||
@@ -962,7 +1089,9 @@ export declare type TemplateConfirm = { | ||
* | ||
* Because of the height limitation for carousel template messages, the lower part of the `text` display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for carousel template messages, the lower | ||
* part of the `text` display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
* | ||
* Keep the number of actions consistent for all columns. | ||
* If you use an image or title for a column, make sure to do the same for all other columns. | ||
* Keep the number of actions consistent for all columns. If you use an image | ||
* or title for a column, make sure to do the same for all other columns. | ||
*/ | ||
@@ -987,4 +1116,7 @@ export declare type TemplateCarousel = { | ||
* | ||
* - `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire image area. Parts of the image that | ||
* do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -1057,2 +1189,59 @@ * Applies to all columns. The default value is `cover`. | ||
/** | ||
* These properties are used for the quick reply. | ||
* | ||
* For more information, see | ||
* [Using quick replies](https://developers.line.me/en/docs/messaging-api/using-quick-reply/). | ||
*/ | ||
export declare type QuickReply = { | ||
/** | ||
* This is a container that contains | ||
* [quick reply buttons](https://developers.line.me/en/reference/messaging-api/#quick-reply-button-object). | ||
* | ||
* Array of objects (Max: 13) | ||
*/ | ||
items: QuickReplyItem[]; | ||
}; | ||
/** | ||
* This is a quick reply option that is displayed as a button. | ||
* | ||
* For more information, see | ||
* [quick reply buttons](https://developers.line.me/en/reference/messaging-api/#quick-reply-button-object). | ||
*/ | ||
export declare type QuickReplyItem = { | ||
type: "action"; | ||
/** | ||
* URL of the icon that is displayed at the beginning of the button (Max: 1000 characters) | ||
* | ||
* - URL scheme: https | ||
* - Image format: PNG | ||
* - Aspect ratio: 1:1 | ||
* - Data size: Up to 1 MB | ||
* | ||
* There is no limit on the image size. If the `action` property has the | ||
* following actions with empty `imageUrl`: | ||
* | ||
* - [camera action](https://developers.line.me/en/reference/messaging-api/#camera-action) | ||
* - [camera roll action](https://developers.line.me/en/reference/messaging-api/#camera-roll-action) | ||
* - [location action](https://developers.line.me/en/reference/messaging-api/#location-action) | ||
* | ||
* the default icon is displayed. | ||
*/ | ||
imageUrl?: string; | ||
/** | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
* | ||
* The following is a list of the available actions: | ||
* | ||
* - [Postback action](https://developers.line.me/en/reference/messaging-api/#postback-action) | ||
* - [Message action](https://developers.line.me/en/reference/messaging-api/#message-action) | ||
* - [Datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action) | ||
* - [Camera action](https://developers.line.me/en/reference/messaging-api/#camera-action) | ||
* - [Camera roll action](https://developers.line.me/en/reference/messaging-api/#camera-roll-action) | ||
* - [Location action](https://developers.line.me/en/reference/messaging-api/#location-action) | ||
*/ | ||
action: Action; | ||
}; | ||
/** | ||
* These are types of actions for your bot to take when a user taps a button or an image in a message. | ||
@@ -1072,3 +1261,4 @@ * | ||
/** | ||
* When a control associated with this action is tapped, a postback event is returned via webhook with the specified string in the data property. | ||
* When a control associated with this action is tapped, a postback event is | ||
* returned via webhook with the specified string in the data property. | ||
*/ | ||
@@ -1078,10 +1268,12 @@ export declare type PostbackAction = { | ||
/** | ||
* String returned via webhook in the `postback.data` property of the postback event (Max: 300 characters) | ||
* String returned via webhook in the `postback.data` property of the | ||
* postback event (Max: 300 characters) | ||
*/ | ||
data: string; | ||
/** | ||
* Text displayed in the chat as a message sent by the user when the action is performed. | ||
* Returned from the server through a webhook. | ||
* This property cannot be used with quick reply buttons. (Max: 300 characters) | ||
* The `displayText` and `text` properties cannot both be used at the same time. | ||
* Text displayed in the chat as a message sent by the user when the action | ||
* is performed. Returned from the server through a webhook. | ||
* | ||
* - This property cannot be used with quick reply buttons. (Max: 300 characters) | ||
* - The `displayText` and `text` properties cannot both be used at the same time. | ||
* @deprecated | ||
@@ -1092,5 +1284,8 @@ */ | ||
* Text displayed in the chat as a message sent by the user when the action is performed. | ||
* Required for quick reply buttons. | ||
* Optional for the other message types. | ||
* | ||
* - Required for quick reply buttons. | ||
* - Optional for the other message types. | ||
* | ||
* Max: 300 characters | ||
* | ||
* The `displayText` and `text` properties cannot both be used at the same time. | ||
@@ -1101,3 +1296,4 @@ */ | ||
/** | ||
* When a control associated with this action is tapped, the string in the text property is sent as a message from the user. | ||
* When a control associated with this action is tapped, the string in the text | ||
* property is sent as a message from the user. | ||
*/ | ||
@@ -1112,3 +1308,4 @@ export declare type MessageAction = { | ||
/** | ||
* When a control associated with this action is tapped, the URI specified in the `uri` property is opened. | ||
* When a control associated with this action is tapped, the URI specified in | ||
* the `uri` property is opened. | ||
*/ | ||
@@ -1124,3 +1321,7 @@ export declare type URIAction = { | ||
/** | ||
* When a control associated with this action is tapped, a [postback event](https://developers.line.me/en/reference/messaging-api/#postback-event) is returned via webhook with the date and time selected by the user from the date and time selection dialog. | ||
* When a control associated with this action is tapped, a | ||
* [postback event](https://developers.line.me/en/reference/messaging-api/#postback-event) | ||
* is returned via webhook with the date and time selected by the user from the | ||
* date and time selection dialog. | ||
* | ||
* The datetime picker action does not support time zones. | ||
@@ -1130,3 +1331,5 @@ * | ||
* | ||
* The date and time formats for the `initial`, `max`, and `min` values are shown below. The `full-date`, `time-hour`, and `time-minute` formats follow the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) protocol. | ||
* The date and time formats for the `initial`, `max`, and `min` values are | ||
* shown below. The `full-date`, `time-hour`, and `time-minute` formats follow | ||
* the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) protocol. | ||
* | ||
@@ -1142,3 +1345,4 @@ * | Mode | Format | Example | | ||
/** | ||
* String returned via webhook in the `postback.data` property of the postback event (Max: 300 characters) | ||
* String returned via webhook in the `postback.data` property of the | ||
* postback event (Max: 300 characters) | ||
*/ | ||
@@ -1152,7 +1356,9 @@ data: string; | ||
/** | ||
* Largest date or time value that can be selected. Must be greater than the `min` value. | ||
* Largest date or time value that can be selected. Must be greater than the | ||
* `min` value. | ||
*/ | ||
max?: string; | ||
/** | ||
* Smallest date or time value that can be selected. Must be less than the `max` value. | ||
* Smallest date or time value that can be selected. Must be less than the | ||
* `max` value. | ||
*/ | ||
@@ -1168,10 +1374,18 @@ min?: string; | ||
* | ||
* - [Rich menu object](https://developers.line.me/en/reference/messaging-api/#rich-menu-object) without the rich menu ID. Use this object when you [create a rich menu](https://developers.line.me/en/reference/messaging-api/#create-rich-menu). | ||
* - [Rich menu response object](https://developers.line.me/en/reference/messaging-api/#rich-menu-response-object) with the rich menu ID. This object is returned when you [get a rich menu](https://developers.line.me/en/reference/messaging-api/#get-rich-menu) or [get a list of rich menus](https://developers.line.me/en/reference/messaging-api/#get-rich-menu-list). | ||
* - [Rich menu object](https://developers.line.me/en/reference/messaging-api/#rich-menu-object) | ||
* without the rich menu ID. Use this object when you | ||
* [create a rich menu](https://developers.line.me/en/reference/messaging-api/#create-rich-menu). | ||
* - [Rich menu response object](https://developers.line.me/en/reference/messaging-api/#rich-menu-response-object) | ||
* with the rich menu ID. This object is returned when you | ||
* [get a rich menu](https://developers.line.me/en/reference/messaging-api/#get-rich-menu) | ||
* or [get a list of rich menus](https://developers.line.me/en/reference/messaging-api/#get-rich-menu-list). | ||
* | ||
* [Area objects](https://developers.line.me/en/reference/messaging-api/#area-object) and [action objects](https://developers.line.me/en/reference/messaging-api/#action-objects) are included in these objects. | ||
* [Area objects](https://developers.line.me/en/reference/messaging-api/#area-object) and | ||
* [action objects](https://developers.line.me/en/reference/messaging-api/#action-objects) | ||
* are included in these objects. | ||
*/ | ||
export declare type RichMenu = { | ||
/** | ||
* [`size` object](https://developers.line.me/en/reference/messaging-api/#size-object) which contains the width and height of the rich menu displayed in the chat. | ||
* [`size` object](https://developers.line.me/en/reference/messaging-api/#size-object) | ||
* which contains the width and height of the rich menu displayed in the chat. | ||
* Rich menu images must be one of the following sizes: 2500x1686px or 2500x843px. | ||
@@ -1186,3 +1400,6 @@ */ | ||
* Name of the rich menu. | ||
* This value can be used to help manage your rich menus and is not displayed to users. | ||
* | ||
* This value can be used to help manage your rich menus and is not displayed | ||
* to users. | ||
* | ||
* (Max: 300 characters) | ||
@@ -1196,3 +1413,4 @@ */ | ||
/** | ||
* Array of [area objects](https://developers.line.me/en/reference/messaging-api/#area-object) which define the coordinates and size of tappable areas | ||
* Array of [area objects](https://developers.line.me/en/reference/messaging-api/#area-object) | ||
* which define the coordinates and size of tappable areas | ||
* (Max: 20 area objects) | ||
@@ -1199,0 +1417,0 @@ */ |
473
lib/types.ts
@@ -36,5 +36,9 @@ export interface Config { | ||
export type EventBase = { | ||
/** Time of the event in milliseconds */ | ||
/** | ||
* Time of the event in milliseconds | ||
*/ | ||
timestamp: number; | ||
/** Source user, group, or room object with information about the source of the event. */ | ||
/** | ||
* Source user, group, or room object with information about the source of the event. | ||
*/ | ||
source: EventSource; | ||
@@ -52,4 +56,6 @@ }; | ||
* ID of the source user. | ||
* | ||
* Only included in [message events](https://developers.line.me/en/reference/messaging-api/#message-event). | ||
* Not included if the user has not agreed to the [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
* Not included if the user has not agreed to the | ||
* [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
*/ | ||
@@ -64,4 +70,6 @@ userId?: string; | ||
* ID of the source user. | ||
* | ||
* Only included in [message events](https://developers.line.me/en/reference/messaging-api/#message-event). | ||
* Not included if the user has not agreed to the [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
* Not included if the user has not agreed to the | ||
* [Official Accounts Terms of Use](https://developers.line.me/en/docs/messaging-api/user-consent/). | ||
*/ | ||
@@ -75,4 +83,6 @@ userId?: string; | ||
* Webhook event object which contains the sent message. | ||
* The `message` property contains a message object which corresponds with the message type. You can reply to message events. | ||
* | ||
* The `message` property contains a message object which corresponds with the | ||
* message type. You can reply to message events. | ||
* | ||
* @see [Message event](https://developers.line.me/en/reference/messaging-api/#message-event) | ||
@@ -87,3 +97,2 @@ */ | ||
* Event object for when your account is added as a friend (or unblocked). | ||
* You can reply to follow events. | ||
*/ | ||
@@ -103,3 +112,5 @@ export type FollowEvent = { type: "follow" } & ReplyableEvent; | ||
* - For groups: A join event is sent when a user invites your bot. | ||
* - For rooms: A join event is sent when the first event (for example when a user sends a message or is added to the room) occurs after your bot is added. | ||
* - For rooms: A join event is sent when the first event (for example when a | ||
* user sends a message or is added to the room) occurs after your bot is | ||
* added. | ||
*/ | ||
@@ -109,3 +120,3 @@ export type JoinEvent = { type: "join" } & ReplyableEvent; | ||
/** | ||
* Event object for when a user removes your bot from a [group](https://developers.line.me/en/docs/messaging-api/group-chats/#group) or when your bot leaves a [group](https://developers.line.me/en/docs/messaging-api/group-chats/#group) or [room](https://developers.line.me/en/docs/messaging-api/group-chats/#room). | ||
* Event object for when a user removes your bot from a group or a room. | ||
*/ | ||
@@ -115,4 +126,4 @@ export type LeaveEvent = { type: "leave" } & EventBase; | ||
/** | ||
* Event object for when a user performs an action on a [template message](https://developers.line.me/en/reference/messaging-api/#template-messages) which initiates a postback. | ||
* You can reply to postback events. | ||
* Event object for when a user performs an action on a | ||
* [template message](https://developers.line.me/en/reference/messaging-api/#template-messages). | ||
*/ | ||
@@ -125,4 +136,4 @@ export type PostbackEvent = { | ||
/** | ||
* Event object for when a user enters or leaves the range of a [LINE Beacon](https://developers.line.me/en/docs/messaging-api/using-beacons/). | ||
* You can reply to beacon events. | ||
* Event object for when a user enters or leaves the range of a | ||
* [LINE Beacon](https://developers.line.me/en/docs/messaging-api/using-beacons/). | ||
*/ | ||
@@ -141,5 +152,7 @@ export type BeaconEvent = ReplyableEvent & { | ||
* Device message of beacon that was detected. | ||
* | ||
* This message consists of data generated by the beacon to send notifications to bots. | ||
* Only included in webhooks from devices that support the "device message" property. | ||
* For more information, see the [LINE Simple Beacon specification](https://github.com/line/line-simple-beacon/blob/master/README.en.md/#line-simple-beacon-frame). | ||
* For more information, see the | ||
* [LINE Simple Beacon specification](https://github.com/line/line-simple-beacon/blob/master/README.en.md/#line-simple-beacon-frame). | ||
*/ | ||
@@ -210,3 +223,4 @@ dm?: string; | ||
* Message object which contains the sticker data sent from the source. | ||
* For a list of basic LINE stickers and sticker IDs, see [sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For a list of basic LINE stickers and sticker IDs, see | ||
* [sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -222,5 +236,8 @@ export type StickerEventMessage = { | ||
/** | ||
* Object with the date and time selected by a user through a [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* Only returned for postback actions via a [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* The `full-date`, `time-hour`, and `time-minute` formats follow the [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt). | ||
* Object with the date and time selected by a user through a | ||
* [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* Only returned for postback actions via a | ||
* [datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action). | ||
* The `full-date`, `time-hour`, and `time-minute` formats follow the | ||
* [RFC3339 protocol](https://www.ietf.org/rfc/rfc3339.txt). | ||
*/ | ||
@@ -260,5 +277,20 @@ params?: { | ||
/** | ||
* @see [Common properties for messages](https://developers.line.me/en/reference/messaging-api/#common-properties-for-messages) | ||
*/ | ||
export type MessageCommon = { | ||
/** | ||
* For the quick reply feature. | ||
* For more information, see [Using quick replies](https://developers.line.me/en/docs/messaging-api/using-quick-reply/). | ||
* | ||
* If the user receives multiple | ||
* [message objects](https://developers.line.me/en/reference/messaging-api/#message-objects), | ||
* the quickReply property of the last message object is displayed. | ||
*/ | ||
quickReply?: QuickReply; | ||
}; | ||
/** | ||
* @see [Text message](https://developers.line.me/en/reference/messaging-api/#text-message) | ||
*/ | ||
export type TextMessage = { | ||
export type TextMessage = MessageCommon & { | ||
type: "text"; | ||
@@ -269,3 +301,4 @@ /** | ||
* - Unicode emoji | ||
* - LINE original emoji ([Unicode codepoint table for LINE original emoji](https://developers.line.me/media/messaging-api/emoji-list.pdf)) | ||
* - LINE original emoji | ||
* ([Unicode codepoint table for LINE original emoji](https://developers.line.me/media/messaging-api/emoji-list.pdf)) | ||
* | ||
@@ -280,3 +313,3 @@ * Max: 2000 characters | ||
*/ | ||
export type ImageMessage = { | ||
export type ImageMessage = MessageCommon & { | ||
type: "image"; | ||
@@ -306,3 +339,3 @@ /** | ||
*/ | ||
export type VideoMessage = { | ||
export type VideoMessage = MessageCommon & { | ||
type: "video"; | ||
@@ -334,3 +367,3 @@ /** | ||
*/ | ||
export type AudioMessage = { | ||
export type AudioMessage = MessageCommon & { | ||
type: "audio"; | ||
@@ -355,3 +388,3 @@ /** | ||
*/ | ||
export type LocationMessage = { | ||
export type LocationMessage = MessageCommon & { | ||
type: "location"; | ||
@@ -373,7 +406,8 @@ /** | ||
*/ | ||
export type StickerMessage = { | ||
export type StickerMessage = MessageCommon & { | ||
type: "sticker"; | ||
/** | ||
* Package ID for a set of stickers. | ||
* For information on package IDs, see the [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For information on package IDs, see the | ||
* [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -383,3 +417,5 @@ packageId: string; | ||
* Sticker ID. | ||
* For a list of sticker IDs for stickers that can be sent with the Messaging API, see the [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
* For a list of sticker IDs for stickers that can be sent with the Messaging | ||
* API, see the | ||
* [Sticker list](https://developers.line.me/media/messaging-api/sticker_list.pdf). | ||
*/ | ||
@@ -392,6 +428,7 @@ stickerId: string; | ||
*/ | ||
export type ImageMapMessage = { | ||
export type ImageMapMessage = MessageCommon & { | ||
type: "imagemap"; | ||
/** | ||
* [Base URL](https://developers.line.me/en/reference/messaging-api/#base-url) of image (Max: 1000 characters, **HTTPS**) | ||
* [Base URL](https://developers.line.me/en/reference/messaging-api/#base-url) of image | ||
* (Max: 1000 characters, **HTTPS**) | ||
*/ | ||
@@ -411,3 +448,5 @@ baseUrl: string; | ||
/** | ||
* Template messages are messages with predefined layouts which you can customize. For more information, see [template messages](https://developers.line.me/en/docs/messaging-api/message-types/#template-messages). | ||
* Template messages are messages with predefined layouts which you can | ||
* customize. For more information, see | ||
* [template messages](https://developers.line.me/en/docs/messaging-api/message-types/#template-messages). | ||
* | ||
@@ -423,3 +462,3 @@ * The following template types are available: | ||
*/ | ||
export type TemplateMessage = { | ||
export type TemplateMessage = MessageCommon & { | ||
type: "template"; | ||
@@ -431,3 +470,3 @@ /** | ||
/** | ||
* A [Buttons](https://developers.line.me/en/reference/messaging-api/#buttons), [Confirm](https://developers.line.me/en/reference/messaging-api/#confirm), [Carousel](https://developers.line.me/en/reference/messaging-api/#carousel), or [Image Carousel](https://developers.line.me/en/reference/messaging-api/#image-carousel) object. | ||
* Carousel template content | ||
*/ | ||
@@ -440,7 +479,8 @@ template: TemplateContent; | ||
* You can customize the layout freely by combining multiple elements. | ||
* For more information, see [Using Flex Messages](https://developers.line.me/en/docs/messaging-api/using-flex-messages/). | ||
* For more information, see | ||
* [Using Flex Messages](https://developers.line.me/en/docs/messaging-api/using-flex-messages/). | ||
* | ||
* @see [Flex messages](https://developers.line.me/en/reference/messaging-api/#flex-message) | ||
*/ | ||
export type FlexMessage = { | ||
export type FlexMessage = MessageCommon & { | ||
type: "flex"; | ||
@@ -454,3 +494,4 @@ altText: string; | ||
* | ||
* When a region is tapped, the user is redirected to the URI specified in `uri` and the message specified in `message` is sent. | ||
* When a region is tapped, the user is redirected to the URI specified in | ||
* `uri` and the message specified in `message` is sent. | ||
* | ||
@@ -507,3 +548,4 @@ * @see [Imagemap action objects](https://developers.line.me/en/reference/messaging-api/#imagemap-action-objects) | ||
* | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) for the containers' JSON data samples and usage. | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) | ||
* for the containers' JSON data samples and usage. | ||
*/ | ||
@@ -513,4 +555,7 @@ export type FlexContainer = FlexBubble | FlexCarousel; | ||
/** | ||
* This is a container that contains one message bubble. It can contain four blocks: header, hero, body, and footer. | ||
* For more information about using each block, see [Block](https://developers.line.me/en/docs/messaging-api/flex-message-elements/#block). | ||
* This is a container that contains one message bubble. It can contain four | ||
* blocks: header, hero, body, and footer. | ||
* | ||
* For more information about using each block, see | ||
* [Block](https://developers.line.me/en/docs/messaging-api/flex-message-elements/#block). | ||
*/ | ||
@@ -520,3 +565,4 @@ export type FlexBubble = { | ||
/** | ||
* Text directionality and the order of components in horizontal boxes in the container. Specify one of the following values: | ||
* Text directionality and the order of components in horizontal boxes in the | ||
* container. Specify one of the following values: | ||
* | ||
@@ -549,5 +595,6 @@ * - `ltr`: Left to right | ||
/** | ||
* `true` to place a separator above the block. | ||
* `true` will be ignored for the first block in a container because you cannot place a separator above the first block. | ||
* The default value is `false`. | ||
* - `true` to place a separator above the block. | ||
* - `true` will be ignored for the first block in a container because you | ||
* cannot place a separator above the first block. | ||
* - The default value is `false`. | ||
*/ | ||
@@ -570,3 +617,4 @@ separator?: boolean; | ||
/** | ||
* Components are objects that compose a Flex Message container. Here are the types of components available: | ||
* Components are objects that compose a Flex Message container. Here are the | ||
* types of components available: | ||
* | ||
@@ -582,3 +630,6 @@ * - [Box](https://developers.line.me/en/reference/messaging-api/#box) | ||
* | ||
* See [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) and [Flex Message layout](https://developers.line.me/en/docs/messaging-api/flex-message-layout/) for the components' JSON data samples and usage. | ||
* See the followings for the components' JSON data samples and usage. | ||
* | ||
* - [Flex Message elements](https://developers.line.me/en/docs/messaging-api/flex-message-elements/) | ||
* - [Flex Message layout](https://developers.line.me/en/docs/messaging-api/flex-message-layout/) | ||
*/ | ||
@@ -604,7 +655,11 @@ export type FlexComponent = | ||
* | ||
* - `horizontal`: Components are placed horizontally. The `direction` property of the [bubble](https://developers.line.me/en/reference/messaging-api/#bubble) container specifies the order. | ||
* - `horizontal`: Components are placed horizontally. The `direction` | ||
* property of the [bubble](https://developers.line.me/en/reference/messaging-api/#bubble) | ||
* container specifies the order. | ||
* - `vertical`: Components are placed vertically from top to bottom. | ||
* - `baseline`: Components are placed in the same way as `horizontal` is specified except the baselines of the components are aligned. | ||
* - `baseline`: Components are placed in the same way as `horizontal` is | ||
* specified except the baselines of the components are aligned. | ||
* | ||
* For more information, see [Types of box layouts](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#box-layout-types). | ||
* For more information, see | ||
* [Types of box layouts](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#box-layout-types). | ||
*/ | ||
@@ -616,11 +671,21 @@ layout: "horizontal" | "vertical" | "baseline"; | ||
* - When the `layout` property is `horizontal` or `vertical`: | ||
* [Box](https://developers.line.me/en/reference/messaging-api/#box), [button](https://developers.line.me/en/reference/messaging-api/#button), [filler](https://developers.line.me/en/reference/messaging-api/#filler), [image](https://developers.line.me/en/reference/messaging-api/#f-image), [separator](https://developers.line.me/en/reference/messaging-api/#separator), and [text](https://developers.line.me/en/reference/messaging-api/#f-text) components | ||
* + [Box](https://developers.line.me/en/reference/messaging-api/#box) | ||
* + [button](https://developers.line.me/en/reference/messaging-api/#button) | ||
* + [filler](https://developers.line.me/en/reference/messaging-api/#filler) | ||
* + [image](https://developers.line.me/en/reference/messaging-api/#f-image) | ||
* + [separator](https://developers.line.me/en/reference/messaging-api/#separator) | ||
* + [text](https://developers.line.me/en/reference/messaging-api/#f-text) | ||
* - When the `layout` property is `baseline`: | ||
* [filler](https://developers.line.me/en/reference/messaging-api/#filler), [icon](https://developers.line.me/en/reference/messaging-api/#icon), and [text](https://developers.line.me/en/reference/messaging-api/#f-text) components | ||
* + [filler](https://developers.line.me/en/reference/messaging-api/#filler) | ||
* + [icon](https://developers.line.me/en/reference/messaging-api/#icon) | ||
* + [text](https://developers.line.me/en/reference/messaging-api/#f-text) | ||
*/ | ||
contents: FlexComponent[]; | ||
/** | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* The ratio of the width or height of this box within the parent box. The | ||
* default value for the horizontal parent box is `1`, and the default value | ||
* for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
@@ -630,5 +695,8 @@ flex?: number; | ||
* Minimum space between components in this box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is `none`. | ||
* To override this setting for a specific component, set the `margin` property of that component. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is `none`. | ||
* - To override this setting for a specific component, set the `margin` | ||
* property of that component. | ||
*/ | ||
@@ -638,5 +706,9 @@ spacing?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -646,2 +718,3 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
@@ -654,2 +727,3 @@ */ | ||
* This component draws a button. | ||
* | ||
* When the user taps a button, a specified action is performed. | ||
@@ -661,2 +735,3 @@ */ | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
@@ -667,4 +742,8 @@ */ | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
@@ -674,5 +753,9 @@ flex?: number; | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -695,5 +778,6 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
/** | ||
* Character color when the `style` property is `link`. | ||
* Background color when the `style` property is `primary` or `secondary`. | ||
* Use a hexadecimal color code. | ||
* | ||
* - Character color when the `style` property is `link`. | ||
* - Background color when the `style` property is `primary` or `secondary`. | ||
*/ | ||
@@ -710,3 +794,4 @@ color?: string; | ||
* | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` property will be ignored. | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` | ||
* property will be ignored. | ||
*/ | ||
@@ -741,6 +826,11 @@ gravity?: "top" | "bottom" | "center"; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -786,11 +876,20 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* - For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
flex?: number; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -857,4 +956,7 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* | ||
* - `cover`: The image fills the entire drawing area. Parts of the image that do not fit in the drawing area are not displayed. | ||
* - `fit`: The entire image is displayed in the drawing area. The background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire drawing area. Parts of the image | ||
* that do not fit in the drawing area are not displayed. | ||
* - `fit`: The entire image is displayed in the drawing area. The background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -881,6 +983,11 @@ * The default value is `fit`. | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -895,3 +1002,4 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
/** | ||
* This is an invisible component that places a fixed-size space at the beginning or end of the box. | ||
* This is an invisible component that places a fixed-size space at the | ||
* beginning or end of the box. | ||
*/ | ||
@@ -913,11 +1021,20 @@ export type FlexSpacer = { | ||
* The ratio of the width or height of this box within the parent box. | ||
* The default value for the horizontal parent box is `1`, and the default value for the vertical parent box is `0`. | ||
* For more information, see [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
* | ||
* The default value for the horizontal parent box is `1`, and the default | ||
* value for the vertical parent box is `0`. | ||
* | ||
* For more information, see | ||
* [Width and height of components](https://developers.line.me/en/docs/messaging-api/flex-message-layout/#component-width-and-height). | ||
*/ | ||
flex?: number; | ||
/** | ||
* Minimum space between this box and the previous component in the parent box. | ||
* `none` does not set a space while the other values set a space whose size increases in the order of listing. | ||
* The default value is the value of the `spacing` property of the parent box. | ||
* If this box is the first component in the parent box, the `margin` property will be ignored. | ||
* Minimum space between this box and the previous component in the parent | ||
* box. | ||
* | ||
* - `none` does not set a space while the other values set a space whose | ||
* size increases in the order of listing. | ||
* - The default value is the value of the `spacing` property of the parent | ||
* box. | ||
* - If this box is the first component in the parent box, the `margin` | ||
* property will be ignored. | ||
*/ | ||
@@ -960,3 +1077,4 @@ margin?: "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; | ||
* | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` property will be ignored. | ||
* If the `layout` property of the parent box is `baseline`, the `gravity` | ||
* property will be ignored. | ||
*/ | ||
@@ -966,10 +1084,13 @@ gravity?: "top" | "bottom" | "center"; | ||
* `true` to wrap text. | ||
* | ||
* The default value is `false`. | ||
* If set to `true`, you can use a new line character (\n) to begin on a new line. | ||
* | ||
* If set to `true`, you can use a new line character (\n) to begin on a new | ||
* line. | ||
*/ | ||
wrap?: boolean; | ||
/** | ||
* Max number of lines. If the text does not fit in the specified number of lines, | ||
* an ellipsis (…) is displayed at the end of the last line. | ||
* If set to 0, all the text is displayed. The default value is 0. | ||
* Max number of lines. If the text does not fit in the specified number of | ||
* lines, an ellipsis (…) is displayed at the end of the last line. If set to | ||
* 0, all the text is displayed. The default value is 0. | ||
*/ | ||
@@ -1003,4 +1124,6 @@ maxLines?: number; | ||
* | ||
* Because of the height limitation for buttons template messages, the lower part of the text display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for buttons template messages, the lower | ||
* part of the text display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
*/ | ||
@@ -1030,4 +1153,7 @@ export type TemplateButtons = { | ||
* | ||
* - `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire image area. Parts of the image that | ||
* do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -1062,4 +1188,6 @@ * The default value is `cover`. | ||
* | ||
* Because of the height limitation for confirm template messages, the lower part of the `text` display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for confirm template messages, the lower | ||
* part of the `text` display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
*/ | ||
@@ -1082,7 +1210,9 @@ export type TemplateConfirm = { | ||
* | ||
* Because of the height limitation for carousel template messages, the lower part of the `text` display area will get cut off if the height limitation is exceeded. | ||
* For this reason, depending on the character width, the message text may not be fully displayed even when it is within the character limits. | ||
* Because of the height limitation for carousel template messages, the lower | ||
* part of the `text` display area will get cut off if the height limitation is | ||
* exceeded. For this reason, depending on the character width, the message | ||
* text may not be fully displayed even when it is within the character limits. | ||
* | ||
* Keep the number of actions consistent for all columns. | ||
* If you use an image or title for a column, make sure to do the same for all other columns. | ||
* Keep the number of actions consistent for all columns. If you use an image | ||
* or title for a column, make sure to do the same for all other columns. | ||
*/ | ||
@@ -1107,4 +1237,7 @@ export type TemplateCarousel = { | ||
* | ||
* - `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. | ||
* - `cover`: The image fills the entire image area. Parts of the image that | ||
* do not fit in the area are not displayed. | ||
* - `contain`: The entire image is displayed in the image area. A background | ||
* is displayed in the unused areas to the left and right of vertical images | ||
* and in the areas above and below horizontal images. | ||
* | ||
@@ -1179,2 +1312,61 @@ * Applies to all columns. The default value is `cover`. | ||
/** | ||
* These properties are used for the quick reply. | ||
* | ||
* For more information, see | ||
* [Using quick replies](https://developers.line.me/en/docs/messaging-api/using-quick-reply/). | ||
*/ | ||
export type QuickReply = { | ||
/** | ||
* This is a container that contains | ||
* [quick reply buttons](https://developers.line.me/en/reference/messaging-api/#quick-reply-button-object). | ||
* | ||
* Array of objects (Max: 13) | ||
*/ | ||
items: QuickReplyItem[]; | ||
}; | ||
/** | ||
* This is a quick reply option that is displayed as a button. | ||
* | ||
* For more information, see | ||
* [quick reply buttons](https://developers.line.me/en/reference/messaging-api/#quick-reply-button-object). | ||
*/ | ||
export type QuickReplyItem = { | ||
type: "action"; | ||
/** | ||
* URL of the icon that is displayed at the beginning of the button (Max: 1000 characters) | ||
* | ||
* - URL scheme: https | ||
* - Image format: PNG | ||
* - Aspect ratio: 1:1 | ||
* - Data size: Up to 1 MB | ||
* | ||
* There is no limit on the image size. If the `action` property has the | ||
* following actions with empty `imageUrl`: | ||
* | ||
* - [camera action](https://developers.line.me/en/reference/messaging-api/#camera-action) | ||
* - [camera roll action](https://developers.line.me/en/reference/messaging-api/#camera-roll-action) | ||
* - [location action](https://developers.line.me/en/reference/messaging-api/#location-action) | ||
* | ||
* the default icon is displayed. | ||
*/ | ||
imageUrl?: string; | ||
/** | ||
* Action performed when this button is tapped. | ||
* | ||
* Specify an [action object](https://developers.line.me/en/reference/messaging-api/#action-objects). | ||
* | ||
* The following is a list of the available actions: | ||
* | ||
* - [Postback action](https://developers.line.me/en/reference/messaging-api/#postback-action) | ||
* - [Message action](https://developers.line.me/en/reference/messaging-api/#message-action) | ||
* - [Datetime picker action](https://developers.line.me/en/reference/messaging-api/#datetime-picker-action) | ||
* - [Camera action](https://developers.line.me/en/reference/messaging-api/#camera-action) | ||
* - [Camera roll action](https://developers.line.me/en/reference/messaging-api/#camera-roll-action) | ||
* - [Location action](https://developers.line.me/en/reference/messaging-api/#location-action) | ||
*/ | ||
action: Action; | ||
}; | ||
/** | ||
* These are types of actions for your bot to take when a user taps a button or an image in a message. | ||
@@ -1198,3 +1390,4 @@ * | ||
/** | ||
* When a control associated with this action is tapped, a postback event is returned via webhook with the specified string in the data property. | ||
* When a control associated with this action is tapped, a postback event is | ||
* returned via webhook with the specified string in the data property. | ||
*/ | ||
@@ -1204,10 +1397,12 @@ export type PostbackAction = { | ||
/** | ||
* String returned via webhook in the `postback.data` property of the postback event (Max: 300 characters) | ||
* String returned via webhook in the `postback.data` property of the | ||
* postback event (Max: 300 characters) | ||
*/ | ||
data: string; | ||
/** | ||
* Text displayed in the chat as a message sent by the user when the action is performed. | ||
* Returned from the server through a webhook. | ||
* This property cannot be used with quick reply buttons. (Max: 300 characters) | ||
* The `displayText` and `text` properties cannot both be used at the same time. | ||
* Text displayed in the chat as a message sent by the user when the action | ||
* is performed. Returned from the server through a webhook. | ||
* | ||
* - This property cannot be used with quick reply buttons. (Max: 300 characters) | ||
* - The `displayText` and `text` properties cannot both be used at the same time. | ||
* @deprecated | ||
@@ -1218,5 +1413,8 @@ */ | ||
* Text displayed in the chat as a message sent by the user when the action is performed. | ||
* Required for quick reply buttons. | ||
* Optional for the other message types. | ||
* | ||
* - Required for quick reply buttons. | ||
* - Optional for the other message types. | ||
* | ||
* Max: 300 characters | ||
* | ||
* The `displayText` and `text` properties cannot both be used at the same time. | ||
@@ -1228,3 +1426,4 @@ */ | ||
/** | ||
* When a control associated with this action is tapped, the string in the text property is sent as a message from the user. | ||
* When a control associated with this action is tapped, the string in the text | ||
* property is sent as a message from the user. | ||
*/ | ||
@@ -1240,3 +1439,4 @@ export type MessageAction = { | ||
/** | ||
* When a control associated with this action is tapped, the URI specified in the `uri` property is opened. | ||
* When a control associated with this action is tapped, the URI specified in | ||
* the `uri` property is opened. | ||
*/ | ||
@@ -1253,3 +1453,7 @@ export type URIAction = { | ||
/** | ||
* When a control associated with this action is tapped, a [postback event](https://developers.line.me/en/reference/messaging-api/#postback-event) is returned via webhook with the date and time selected by the user from the date and time selection dialog. | ||
* When a control associated with this action is tapped, a | ||
* [postback event](https://developers.line.me/en/reference/messaging-api/#postback-event) | ||
* is returned via webhook with the date and time selected by the user from the | ||
* date and time selection dialog. | ||
* | ||
* The datetime picker action does not support time zones. | ||
@@ -1259,3 +1463,5 @@ * | ||
* | ||
* The date and time formats for the `initial`, `max`, and `min` values are shown below. The `full-date`, `time-hour`, and `time-minute` formats follow the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) protocol. | ||
* The date and time formats for the `initial`, `max`, and `min` values are | ||
* shown below. The `full-date`, `time-hour`, and `time-minute` formats follow | ||
* the [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) protocol. | ||
* | ||
@@ -1271,3 +1477,4 @@ * | Mode | Format | Example | | ||
/** | ||
* String returned via webhook in the `postback.data` property of the postback event (Max: 300 characters) | ||
* String returned via webhook in the `postback.data` property of the | ||
* postback event (Max: 300 characters) | ||
*/ | ||
@@ -1281,7 +1488,9 @@ data: string; | ||
/** | ||
* Largest date or time value that can be selected. Must be greater than the `min` value. | ||
* Largest date or time value that can be selected. Must be greater than the | ||
* `min` value. | ||
*/ | ||
max?: string; | ||
/** | ||
* Smallest date or time value that can be selected. Must be less than the `max` value. | ||
* Smallest date or time value that can be selected. Must be less than the | ||
* `max` value. | ||
*/ | ||
@@ -1299,10 +1508,18 @@ min?: string; | ||
* | ||
* - [Rich menu object](https://developers.line.me/en/reference/messaging-api/#rich-menu-object) without the rich menu ID. Use this object when you [create a rich menu](https://developers.line.me/en/reference/messaging-api/#create-rich-menu). | ||
* - [Rich menu response object](https://developers.line.me/en/reference/messaging-api/#rich-menu-response-object) with the rich menu ID. This object is returned when you [get a rich menu](https://developers.line.me/en/reference/messaging-api/#get-rich-menu) or [get a list of rich menus](https://developers.line.me/en/reference/messaging-api/#get-rich-menu-list). | ||
* - [Rich menu object](https://developers.line.me/en/reference/messaging-api/#rich-menu-object) | ||
* without the rich menu ID. Use this object when you | ||
* [create a rich menu](https://developers.line.me/en/reference/messaging-api/#create-rich-menu). | ||
* - [Rich menu response object](https://developers.line.me/en/reference/messaging-api/#rich-menu-response-object) | ||
* with the rich menu ID. This object is returned when you | ||
* [get a rich menu](https://developers.line.me/en/reference/messaging-api/#get-rich-menu) | ||
* or [get a list of rich menus](https://developers.line.me/en/reference/messaging-api/#get-rich-menu-list). | ||
* | ||
* [Area objects](https://developers.line.me/en/reference/messaging-api/#area-object) and [action objects](https://developers.line.me/en/reference/messaging-api/#action-objects) are included in these objects. | ||
* [Area objects](https://developers.line.me/en/reference/messaging-api/#area-object) and | ||
* [action objects](https://developers.line.me/en/reference/messaging-api/#action-objects) | ||
* are included in these objects. | ||
*/ | ||
export type RichMenu = { | ||
/** | ||
* [`size` object](https://developers.line.me/en/reference/messaging-api/#size-object) which contains the width and height of the rich menu displayed in the chat. | ||
* [`size` object](https://developers.line.me/en/reference/messaging-api/#size-object) | ||
* which contains the width and height of the rich menu displayed in the chat. | ||
* Rich menu images must be one of the following sizes: 2500x1686px or 2500x843px. | ||
@@ -1317,3 +1534,6 @@ */ | ||
* Name of the rich menu. | ||
* This value can be used to help manage your rich menus and is not displayed to users. | ||
* | ||
* This value can be used to help manage your rich menus and is not displayed | ||
* to users. | ||
* | ||
* (Max: 300 characters) | ||
@@ -1327,3 +1547,4 @@ */ | ||
/** | ||
* Array of [area objects](https://developers.line.me/en/reference/messaging-api/#area-object) which define the coordinates and size of tappable areas | ||
* Array of [area objects](https://developers.line.me/en/reference/messaging-api/#area-object) | ||
* which define the coordinates and size of tappable areas | ||
* (Max: 20 area objects) | ||
@@ -1330,0 +1551,0 @@ */ |
{ | ||
"name": "@line/bot-sdk", | ||
"version": "6.1.1", | ||
"version": "6.2.0", | ||
"description": "Node.js SDK for LINE Messaging API", | ||
@@ -58,3 +58,3 @@ "engines": { | ||
"ts-node": "^3.3.0", | ||
"typescript": "^2.6.1" | ||
"typescript": "^3.0.1" | ||
}, | ||
@@ -61,0 +61,0 @@ "nyc": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2783001
6084