Skip to content

Instantly share code, notes, and snippets.

@rustysys-dev
Created November 29, 2023 06:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rustysys-dev/711296d4ffceb30f9f5193240a55bbe5 to your computer and use it in GitHub Desktop.
Save rustysys-dev/711296d4ffceb30f9f5193240a55bbe5 to your computer and use it in GitHub Desktop.
/**
* This file was auto-generated by openapi-typescript.
* Do not make direct changes to the file.
*/
export type paths = Record<string, never>;
export type webhooks = Record<string, never>;
export interface components {
schemas: {
// KEEP
Message: {
/** @description Type of message */
type: string;
quickReply?: components["schemas"]["QuickReply"];
sender?: components["schemas"]["Sender"];
};
/** @description Quick reply */
// KEEP
QuickReply: {
/** @description Quick reply button objects. */
items?: components["schemas"]["QuickReplyItem"][];
};
QuickReplyItem: {
/**
* Format: uri
* @description URL of the icon that is displayed at the beginning of the button
*/
imageUrl?: string;
action?: components["schemas"]["Action"];
/**
* @description `action`
* @default action
*/
type: string;
};
/** @description Change icon and display name */
Sender: {
/** @description Display name. Certain words such as `LINE` may not be used. */
name?: string;
/**
* Format: uri
* @description URL of the image to display as an icon when sending a message
*/
iconUrl?: string;
};
FlexMessage: {
type: "flex";
} & (Omit<components["schemas"]["Message"], "type"> & {
altText: string;
contents: components["schemas"]["FlexContainer"];
});
FlexContainer: {
type: string;
};
FlexBubble: {
type: "bubble";
} & (Omit<components["schemas"]["FlexContainer"], "type"> & {
/** @enum {string} */
direction?: "ltr" | "rtl";
styles?: components["schemas"]["FlexBubbleStyles"];
header?: components["schemas"]["FlexBox"];
hero?: components["schemas"]["FlexComponent"];
body?: components["schemas"]["FlexBox"];
footer?: components["schemas"]["FlexBox"];
/** @enum {string} */
size?: "nano" | "micro" | "deca" | "hecto" | "kilo" | "mega" | "giga";
action?: components["schemas"]["Action"];
});
FlexCarousel: {
type: "carousel";
} & (Omit<components["schemas"]["FlexContainer"], "type"> & {
contents: components["schemas"]["FlexBubble"][];
});
FlexBubbleStyles: {
header?: components["schemas"]["FlexBlockStyle"];
hero?: components["schemas"]["FlexBlockStyle"];
body?: components["schemas"]["FlexBlockStyle"];
footer?: components["schemas"]["FlexBlockStyle"];
};
FlexBlockStyle: {
backgroundColor?: string;
separator?: boolean;
separatorColor?: string;
};
FlexComponent: {
type: string;
};
FlexBox: {
type: "box";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** @enum {string} */
layout: "horizontal" | "vertical" | "baseline";
/** Format: int32 */
flex?: number;
contents: components["schemas"]["FlexComponent"][];
spacing?: string;
margin?: string;
/** @enum {string} */
position?: "relative" | "absolute";
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?: components["schemas"]["Action"];
/** @enum {string} */
justifyContent?: "center" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly";
/** @enum {string} */
alignItems?: "center" | "flex-start" | "flex-end";
background?: components["schemas"]["FlexBoxBackground"];
});
FlexButton: {
type: "button";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** Format: int32 */
flex?: number;
color?: string;
/** @enum {string} */
style?: "primary" | "secondary" | "link";
action: components["schemas"]["Action"];
/** @enum {string} */
gravity?: "top" | "bottom" | "center";
margin?: string;
/** @enum {string} */
position?: "relative" | "absolute";
offsetTop?: string;
offsetBottom?: string;
offsetStart?: string;
offsetEnd?: string;
/** @enum {string} */
height?: "md" | "sm";
/** @enum {string} */
adjustMode?: "shrink-to-fit";
scaling?: boolean;
});
FlexImage: {
type: "image";
} & (Omit<WithRequired<components["schemas"]["FlexComponent"], "type">, "type"> & {
/**
* Format: uri
* @description 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)
*
*/
url: string;
/**
* Format: int32
* @description The ratio of the width or height of this component within the parent box.
*/
flex?: number;
/** @description The minimum amount of space to include before this component in its parent container.
* */
margin?: string;
/**
* @description 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.
*
* @enum {string}
*/
position?: "relative" | "absolute";
/** @description Offset. */
offsetTop?: string;
/** @description Offset. */
offsetBottom?: string;
/** @description Offset. */
offsetStart?: string;
/** @description Offset. */
offsetEnd?: string;
/**
* @description Alignment style in horizontal direction.
*
* @enum {string}
*/
align?: "start" | "end" | "center";
/**
* @description Alignment style in vertical direction.
* @enum {string}
*/
gravity?: "top" | "bottom" | "center";
/**
* @description The maximum image width. This is md by default.
*
* @default md
*/
size: string;
/** @description 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`.
* */
aspectRatio?: string;
/**
* @description The display style of the image if the aspect ratio of the image and that specified by the aspectRatio property do not match.
*
* @enum {string}
*/
aspectMode?: "fit" | "cover";
/** @description Background color of the image. Use a hexadecimal color code. */
backgroundColor?: string;
action?: components["schemas"]["Action"];
/**
* @description 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.
*
* @default false
*/
animated: boolean;
});
FlexVideo: {
type: "video";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** Format: uri */
url: string;
/** Format: uri */
previewUrl: string;
altContent: components["schemas"]["FlexComponent"];
aspectRatio?: string;
action?: components["schemas"]["Action"];
});
FlexIcon: {
type: "icon";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** Format: uri */
url: string;
size?: string;
aspectRatio?: string;
margin?: string;
/** @enum {string} */
position?: "relative" | "absolute";
offsetTop?: string;
offsetBottom?: string;
offsetStart?: string;
offsetEnd?: string;
scaling?: boolean;
});
FlexText: {
type: "text";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** Format: int32 */
flex?: number;
text?: string;
size?: string;
/** @enum {string} */
align?: "start" | "end" | "center";
/** @enum {string} */
gravity?: "top" | "bottom" | "center";
color?: string;
/** @enum {string} */
weight?: "regular" | "bold";
/** @enum {string} */
style?: "normal" | "italic";
/** @enum {string} */
decoration?: "none" | "underline" | "line-through";
wrap?: boolean;
lineSpacing?: string;
margin?: string;
/** @enum {string} */
position?: "relative" | "absolute";
offsetTop?: string;
offsetBottom?: string;
offsetStart?: string;
offsetEnd?: string;
action?: components["schemas"]["Action"];
/** Format: int32 */
maxLines?: number;
contents?: components["schemas"]["FlexSpan"][];
/** @enum {string} */
adjustMode?: "shrink-to-fit";
scaling?: boolean;
});
FlexSpan: {
type: "span";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
text?: string;
size?: string;
color?: string;
/** @enum {string} */
weight?: "regular" | "bold";
/** @enum {string} */
style?: "normal" | "italic";
/** @enum {string} */
decoration?: "none" | "underline" | "line-through";
});
FlexSeparator: {
type: "separator";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
margin?: string;
color?: string;
});
FlexFiller: {
type: "filler";
} & (Omit<components["schemas"]["FlexComponent"], "type"> & {
/** Format: int32 */
flex?: number;
});
FlexBoxBackground: {
type: string;
};
FlexBoxLinearGradient: {
type: "linearGradient";
} & (Omit<components["schemas"]["FlexBoxBackground"], "type"> & {
angle?: string;
startColor?: string;
endColor?: string;
centerColor?: string;
centerPosition?: string;
});
/** @description Action */
// KEEP
Action: {
/** @description Type of action */
type?: string;
/** @description Label for the action. */
label?: string;
};
CameraAction: {
type: "camera";
} & Omit<components["schemas"]["Action"], "type">;
CameraRollAction: {
type: "cameraRoll";
} & Omit<components["schemas"]["Action"], "type">;
DatetimePickerAction: {
type: "datetimepicker";
} & (Omit<components["schemas"]["Action"], "type"> & {
data?: string;
/** @enum {string} */
mode?: "date" | "time" | "datetime";
initial?: string;
max?: string;
min?: string;
});
LocationAction: {
type: "location";
} & Omit<components["schemas"]["Action"], "type">;
MessageAction: {
type: "message";
} & (Omit<components["schemas"]["Action"], "type"> & {
text?: string;
});
PostbackAction: {
type: "postback";
} & (Omit<components["schemas"]["Action"], "type"> & {
data?: string;
displayText?: string;
text?: string;
/** @enum {string} */
inputOption?: "closeRichMenu" | "openRichMenu" | "openKeyboard" | "openVoice";
fillInText?: string;
});
RichMenuSwitchAction: {
type: "richmenuswitch";
} & (Omit<components["schemas"]["Action"], "type"> & {
data?: string;
richMenuAliasId?: string;
});
URIAction: {
type: "uri";
} & (Omit<components["schemas"]["Action"], "type"> & {
/** Format: uri */
uri?: string;
altUri?: components["schemas"]["AltUri"];
});
AltUri: {
desktop?: string;
};
};
responses: never;
parameters: never;
requestBodies: never;
headers: never;
pathItems: never;
}
export type $defs = Record<string, never>;
type WithRequired<T, K extends keyof T> = T & {
[P in K]-?: T[P];
};
export type operations = Record<string, never>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment