flex-render
Version:
Utility to render LINE Flex Bubble / Carousel JSON for displaying in website.
1,330 lines (1,255 loc) • 34.7 kB
text/typescript
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type AltUri = {
/**
*/
desktop?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type QuickReplyItem = {
/**
* URL of the icon that is displayed at the beginning of the button
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#items-object">imageUrl Documentation</a>
*/
imageUrl?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#items-object">action Documentation</a>
*/
action?: Action;
/**
* `action`
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#items-object">type Documentation</a>
*/
type?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Quick reply
*/
type QuickReply = {
/**
* Quick reply button objects.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#items-object">items Documentation</a>
*/
items?: Array<QuickReplyItem>;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Change icon and display name
*/
type Sender = {
/**
* Display name. Certain words such as `LINE` may not be used.
*/
name?: string;
/**
* URL of the image to display as an icon when sending a message
*/
iconUrl?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type MessageBase = {
/**
* Type of message
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#message-common-properties">type Documentation</a>
*/
type: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#message-common-properties">quickReply Documentation</a>
*/
quickReply?: QuickReply;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#message-common-properties">sender Documentation</a>
*/
sender?: Sender;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type CameraAction = ActionBase & {
type: "camera";
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type CameraRollAction = ActionBase & {
type: "cameraRoll";
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type ClipboardAction = ActionBase & {
type: "clipboard";
/**
* Text that is copied to the clipboard. Max character limit: 1000
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#clipboard-action">clipboardText Documentation</a>
*/
clipboardText: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type DatetimePickerAction = ActionBase & {
type: "datetimepicker";
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action">data Documentation</a>
*/
data?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action">mode Documentation</a>
*/
mode?: DatetimePickerAction.ModeEnum;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action">initial Documentation</a>
*/
initial?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action">max Documentation</a>
*/
max?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#datetime-picker-action">min Documentation</a>
*/
min?: string;
};
declare namespace DatetimePickerAction {
type ModeEnum = "date" | "time" | "datetime";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBlockStyle = {
/**
*/
backgroundColor?: string;
/**
*/
separator?: boolean;
/**
*/
separatorColor?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBoxBackground = FlexBoxLinearGradient | UnknownFlexBoxBackground;
type UnknownFlexBoxBackground = FlexBoxBackgroundBase & {
[key: string]: unknown;
};
type FlexBoxBackgroundBase = {
/**
*/
type: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexComponent = FlexBox | FlexButton | FlexFiller | FlexIcon | FlexImage | FlexSeparator | FlexSpan | FlexText | FlexVideo | UnknownFlexComponent;
type UnknownFlexComponent = FlexComponentBase & {
[key: string]: unknown;
};
type FlexComponentBase = {
/**
*/
type: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBox = FlexComponentBase & {
type: "box";
/**
*/
layout: FlexBox.LayoutEnum;
/**
*/
flex?: number;
/**
*/
contents: Array<FlexComponent>;
/**
*/
spacing?: string;
/**
*/
margin?: string;
/**
*/
position?: FlexBox.PositionEnum;
/**
*/
offsetTop?: string;
/**
*/
offsetBottom?: string;
/**
*/
offsetStart?: string;
/**
*/
offsetEnd?: string;
/**
*/
backgroundColor?: string;
/**
*/
borderColor?: string;
/**
*/
borderWidth?: string;
/**
*/
cornerRadius?: string;
/**
*/
width?: string;
/**
*/
maxWidth?: string;
/**
*/
height?: string;
/**
*/
maxHeight?: string;
/**
*/
paddingAll?: string;
/**
*/
paddingTop?: string;
/**
*/
paddingBottom?: string;
/**
*/
paddingStart?: string;
/**
*/
paddingEnd?: string;
/**
*/
action?: Action;
/**
*/
justifyContent?: FlexBox.JustifyContentEnum;
/**
*/
alignItems?: FlexBox.AlignItemsEnum;
/**
*/
background?: FlexBoxBackground;
};
declare namespace FlexBox {
type LayoutEnum = "horizontal" | "vertical" | "baseline";
type PositionEnum = "relative" | "absolute";
type JustifyContentEnum = "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
type AlignItemsEnum = "center" | "flex-start" | "flex-end";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Width of box border. This is only for `borderWidth` in FlexBox. A value of none means that borders are not rendered; the other values are listed in order of increasing width.
*/
type FlexBoxBorderWidth = "none" | "light" | "normal" | "medium" | "semi-bold" | "bold";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Radius at the time of rounding the corners of the box. This is only for `cornerRadius` in FlexBox. A value of none means that corners are not rounded; the other values are listed in order of increasing radius.
*/
type FlexBoxCornerRadius = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBoxLinearGradient = FlexBoxBackgroundBase & {
type: "linearGradient";
/**
*/
angle?: string;
/**
*/
startColor?: string;
/**
*/
endColor?: string;
/**
*/
centerColor?: string;
/**
*/
centerPosition?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Padding can be specified in pixels, percentage (to the parent box width) or with a keyword. FlexBoxPadding just provides only keywords.
*/
type FlexBoxPadding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* You can specify the minimum space between two components with the `spacing` property of the parent box component, in pixels or with a keyword. FlexBoxSpacing just provides only keywords.
*/
type FlexBoxSpacing = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBubbleStyles = {
/**
*/
header?: FlexBlockStyle;
/**
*/
hero?: FlexBlockStyle;
/**
*/
body?: FlexBlockStyle;
/**
*/
footer?: FlexBlockStyle;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexBubble = FlexContainerBase & {
type: "bubble";
/**
*/
direction?: FlexBubble.DirectionEnum;
/**
*/
styles?: FlexBubbleStyles;
/**
*/
header?: FlexBox;
/**
*/
hero?: FlexComponent;
/**
*/
body?: FlexBox;
/**
*/
footer?: FlexBox;
/**
*/
size?: FlexBubble.SizeEnum;
/**
*/
action?: Action;
};
declare namespace FlexBubble {
type DirectionEnum = "ltr" | "rtl";
type SizeEnum = "nano" | "micro" | "deca" | "hecto" | "kilo" | "mega" | "giga";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexButton = FlexComponentBase & {
type: "button";
/**
*/
flex?: number;
/**
*/
color?: string;
/**
*/
style?: FlexButton.StyleEnum;
/**
*/
action: Action;
/**
*/
gravity?: FlexButton.GravityEnum;
/**
*/
margin?: string;
/**
*/
position?: FlexButton.PositionEnum;
/**
*/
offsetTop?: string;
/**
*/
offsetBottom?: string;
/**
*/
offsetStart?: string;
/**
*/
offsetEnd?: string;
/**
*/
height?: FlexButton.HeightEnum;
/**
*/
adjustMode?: FlexButton.AdjustModeEnum;
/**
*/
scaling?: boolean;
};
declare namespace FlexButton {
type StyleEnum = "primary" | "secondary" | "link";
type GravityEnum = "top" | "bottom" | "center";
type PositionEnum = "relative" | "absolute";
type HeightEnum = "md" | "sm";
type AdjustModeEnum = "shrink-to-fit";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexCarousel = FlexContainerBase & {
type: "carousel";
/**
*/
contents: Array<FlexBubble>;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexContainer = FlexBubble | FlexCarousel | UnknownFlexContainer;
type UnknownFlexContainer = FlexContainerBase & {
[key: string]: unknown;
};
type FlexContainerBase = {
/**
*/
type: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexFiller = FlexComponentBase & {
type: "filler";
/**
*/
flex?: number;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexIcon = FlexComponentBase & {
type: "icon";
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">url Documentation</a>
*/
url: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">size Documentation</a>
*/
size?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">aspectRatio Documentation</a>
*/
aspectRatio?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">margin Documentation</a>
*/
margin?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">position Documentation</a>
*/
position?: FlexIcon.PositionEnum;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">offsetTop Documentation</a>
*/
offsetTop?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">offsetBottom Documentation</a>
*/
offsetBottom?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">offsetStart Documentation</a>
*/
offsetStart?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">offsetEnd Documentation</a>
*/
offsetEnd?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#icon">scaling Documentation</a>
*/
scaling?: boolean;
};
declare namespace FlexIcon {
type PositionEnum = "relative" | "absolute";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* You can set the width of an Flex icon component with the `size` property, in pixels, as a percentage, or with a keyword. FlexIconSize just provides only keywords.
*/
type FlexIconSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "3xl" | "4xl" | "5xl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexImage = FlexComponentBase & {
type: "image";
/**
* Image URL (Max character limit: 2000) Protocol: HTTPS (TLS 1.2 or later) Image format: JPEG or PNG Maximum image size: 1024×1024 pixels Maximum file size: 10 MB (300 KB when the animated property is true)
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">url Documentation</a>
*/
url: string;
/**
* The ratio of the width or height of this component within the parent box.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">flex Documentation</a>
*/
flex?: number;
/**
* The minimum amount of space to include before this component in its parent container.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">margin Documentation</a>
*/
margin?: string;
/**
* Reference for offsetTop, offsetBottom, offsetStart, and offsetEnd. Specify one of the following values: `relative`: Use the previous box as reference. `absolute`: Use the top left of parent element as reference. The default value is relative.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">position Documentation</a>
*/
position?: FlexImage.PositionEnum;
/**
* Offset.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">offsetTop Documentation</a>
*/
offsetTop?: string;
/**
* Offset.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">offsetBottom Documentation</a>
*/
offsetBottom?: string;
/**
* Offset.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">offsetStart Documentation</a>
*/
offsetStart?: string;
/**
* Offset.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">offsetEnd Documentation</a>
*/
offsetEnd?: string;
/**
* Alignment style in horizontal direction.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">align Documentation</a>
*/
align?: FlexImage.AlignEnum;
/**
* Alignment style in vertical direction.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">gravity Documentation</a>
*/
gravity?: FlexImage.GravityEnum;
/**
* The maximum image width. This is md by default.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">size Documentation</a>
*/
size?: string;
/**
* Aspect ratio of the image. `{width}:{height}` format. Specify the value of `{width}` and `{height}` in the range from `1` to `100000`. However, you cannot set `{height}` to a value that is more than three times the value of `{width}`. The default value is `1:1`.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">aspectRatio Documentation</a>
*/
aspectRatio?: string;
/**
* The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">aspectMode Documentation</a>
*/
aspectMode?: FlexImage.AspectModeEnum;
/**
* Background color of the image. Use a hexadecimal color code.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">backgroundColor Documentation</a>
*/
backgroundColor?: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">action Documentation</a>
*/
action?: Action;
/**
* When this is `true`, an animated image (APNG) plays. You can specify a value of true up to 10 images in a single message. You can\'t send messages that exceed this limit. This is `false` by default. Animated images larger than 300 KB aren\'t played back.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#f-image">animated Documentation</a>
*/
animated?: boolean;
};
declare namespace FlexImage {
type PositionEnum = "relative" | "absolute";
type AlignEnum = "start" | "end" | "center";
type GravityEnum = "top" | "bottom" | "center";
type AspectModeEnum = "fit" | "cover";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* You can set the width of an Flex image component with the `size` property, in pixels, as a percentage, or with a keyword. FlexImageSize just provides only keywords.
*/
type FlexImageSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "3xl" | "4xl" | "5xl" | "full";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* You can specify the minimum space before a child component with the `margin` property of the child component, in pixels or with a keyword. FlexMargin just provides only keywords.
*/
type FlexMargin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexMessage = MessageBase & {
type: "flex";
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#flex-message">altText Documentation</a>
*/
altText: string;
/**
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#flex-message">contents Documentation</a>
*/
contents: FlexContainer;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* You can specify the offset of a component with the `offset*` property, in pixels or with a keyword. You can also specify the percentage to the box width for `offsetStart` and `offsetEnd` and to the box height for `offsetTop` and `offsetBottom`. FlexOffset just provides only keywords.
*/
type FlexOffset = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexSeparator = FlexComponentBase & {
type: "separator";
/**
*/
margin?: string;
/**
*/
color?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexSpan = FlexComponentBase & {
type: "span";
/**
*/
text?: string;
/**
*/
size?: string;
/**
*/
color?: string;
/**
*/
weight?: FlexSpan.WeightEnum;
/**
*/
style?: FlexSpan.StyleEnum;
/**
*/
decoration?: FlexSpan.DecorationEnum;
};
declare namespace FlexSpan {
type WeightEnum = "regular" | "bold";
type StyleEnum = "normal" | "italic";
type DecorationEnum = "none" | "underline" | "line-through";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Font size in the `size` property of the Flex span component. You can specify the size in pixels or with a keyword. FlexSpanSize just provides only keywords.
*/
type FlexSpanSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "3xl" | "4xl" | "5xl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexText = FlexComponentBase & {
type: "text";
/**
*/
flex?: number;
/**
*/
text?: string;
/**
*/
size?: string;
/**
*/
align?: FlexText.AlignEnum;
/**
*/
gravity?: FlexText.GravityEnum;
/**
*/
color?: string;
/**
*/
weight?: FlexText.WeightEnum;
/**
*/
style?: FlexText.StyleEnum;
/**
*/
decoration?: FlexText.DecorationEnum;
/**
*/
wrap?: boolean;
/**
*/
lineSpacing?: string;
/**
*/
margin?: string;
/**
*/
position?: FlexText.PositionEnum;
/**
*/
offsetTop?: string;
/**
*/
offsetBottom?: string;
/**
*/
offsetStart?: string;
/**
*/
offsetEnd?: string;
/**
*/
action?: Action;
/**
*/
maxLines?: number;
/**
*/
contents?: Array<FlexSpan>;
/**
*/
adjustMode?: FlexText.AdjustModeEnum;
/**
*/
scaling?: boolean;
};
declare namespace FlexText {
type AlignEnum = "start" | "end" | "center";
type GravityEnum = "top" | "bottom" | "center";
type WeightEnum = "regular" | "bold";
type StyleEnum = "normal" | "italic";
type DecorationEnum = "none" | "underline" | "line-through";
type PositionEnum = "relative" | "absolute";
type AdjustModeEnum = "shrink-to-fit";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* Font size in the `size` property of the Flex text component. You can specify the size in pixels or with a keyword. FlexTextFontSize just provides only keywords.
*/
type FlexTextFontSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "3xl" | "4xl" | "5xl";
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type FlexVideo = FlexComponentBase & {
type: "video";
/**
*/
url: string;
/**
*/
previewUrl: string;
/**
*/
altContent: FlexComponent;
/**
*/
aspectRatio?: string;
/**
*/
action?: Action;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type LocationAction = ActionBase & {
type: "location";
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type MessageAction = ActionBase & {
type: "message";
/**
*/
text?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type PostbackAction = ActionBase & {
type: "postback";
/**
*/
data?: string;
/**
*/
displayText?: string;
/**
*/
text?: string;
/**
*/
inputOption?: PostbackAction.InputOptionEnum;
/**
*/
fillInText?: string;
};
declare namespace PostbackAction {
type InputOptionEnum = "closeRichMenu" | "openRichMenu" | "openKeyboard" | "openVoice";
}
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type RichMenuSwitchAction = ActionBase & {
type: "richmenuswitch";
/**
*/
data?: string;
/**
*/
richMenuAliasId?: string;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type URIAction = ActionBase & {
type: "uri";
/**
*/
uri?: string;
/**
*/
altUri?: AltUri;
};
/**
* LINE Messaging API
* This document describes LINE Messaging API.
*
* The version of the OpenAPI document: 0.0.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
type Action = CameraAction | CameraRollAction | ClipboardAction | DatetimePickerAction | LocationAction | MessageAction | PostbackAction | RichMenuSwitchAction | URIAction | UnknownAction;
type UnknownAction = ActionBase & {
[key: string]: unknown;
};
/**
* Action
*/
type ActionBase = {
/**
* Type of action
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#action-objects">type Documentation</a>
*/
type?: string;
/**
* Label for the action.
*
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#action-objects">label Documentation</a>
*/
label?: string;
};
declare const render: (flexJSON: FlexContainer) => string;
export { type Action, type ActionBase, type CameraAction, type CameraRollAction, DatetimePickerAction, type FlexBlockStyle, FlexBox, type FlexBoxBackground, type FlexBoxBackgroundBase, type FlexBoxBorderWidth, type FlexBoxCornerRadius, type FlexBoxLinearGradient, type FlexBoxPadding, type FlexBoxSpacing, FlexBubble, type FlexBubbleStyles, FlexButton, type FlexCarousel, type FlexComponent, type FlexComponentBase, type FlexContainer, type FlexContainerBase, type FlexFiller, FlexIcon, type FlexIconSize, FlexImage, type FlexImageSize, type FlexMargin, type FlexMessage, type FlexOffset, type FlexSeparator, FlexSpan, type FlexSpanSize, FlexText, type FlexTextFontSize, type FlexVideo, type LocationAction, type MessageAction, PostbackAction, type URIAction, type UnknownAction, type UnknownFlexBoxBackground, type UnknownFlexComponent, type UnknownFlexContainer, render };