Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@line/bot-sdk

Package Overview
Dependencies
Maintainers
4
Versions
66
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@line/bot-sdk - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

14

CHANGELOG.md

@@ -0,1 +1,11 @@

## 2.0.0 (12 June 2017)
#### Type
* Use literal types for 'type' fields
#### Misc
* Update yarn.lock with the latest Yarn
## 1.1.0 (31 May 2017)

@@ -5,3 +15,3 @@

Type
#### Type

@@ -11,3 +21,3 @@ * Separate config type into client and middleware types

Misc
#### Misc

@@ -14,0 +24,0 @@ * Create issue template (#4)

2

package.json
{
"name": "@line/bot-sdk",
"version": "1.1.0",
"version": "2.0.0",
"description": "Node.js SDK for LINE Messaging API",

@@ -5,0 +5,0 @@ "engines": {

@@ -25,4 +25,2 @@ /* tslint:disable interface-over-type-literal no-namespace */

export type Typed = { type: string };
export type WebhookEvent =

@@ -32,3 +30,3 @@ MessageEvent | FollowEvent | UnfollowEvent | JoinEvent |

export type EventBase = Typed & {
export type EventBase = {
timestamp: number,

@@ -40,16 +38,18 @@ source: EventSource,

export type User = Typed & { userId: string };
export type Group = Typed & { groupId: string, userId?: string };
export type Room = Typed & { roomId: string, userId?: string };
export type User = { type: "user", userId: string };
export type Group = { type: "group", groupId: string, userId?: string };
export type Room = { type: "room", roomId: string, userId?: string };
export type ReplyableEvent = EventBase & { replyToken: string };
export type MessageEvent = ReplyableEvent & { message: EventMessage };
export type FollowEvent = ReplyableEvent;
export type UnfollowEvent = EventBase;
export type JoinEvent = ReplyableEvent;
export type LeaveEvent = EventBase;
export type PostbackEvent = ReplyableEvent & { postback: { data: string } };
export type MessageEvent = { type: "message", message: EventMessage } & ReplyableEvent;
export type FollowEvent = { type: "follow" } & ReplyableEvent;
export type UnfollowEvent = { type: "unfollow" } & EventBase;
export type JoinEvent = { type: "join" } & ReplyableEvent;
export type LeaveEvent = { type: "leave" } & EventBase;
export type PostbackEvent = { type: "postback", postback: { data: string } } & ReplyableEvent;
export type BeaconEvent = ReplyableEvent & {
beacon: Typed & {
type: "beacon",
beacon: {
type: "enter" | "leave" | "banner",
hwid: string,

@@ -64,8 +64,9 @@ dm?: string,

export type EventMessageBase = Typed & { id: string };
export type TextEventMessage = EventMessageBase & { text: string };
export type ImageEventMessage = EventMessageBase;
export type VideoEventMessage = EventMessageBase;
export type AudioEventMessage = EventMessageBase;
export type LocationEventMessage = EventMessageBase & {
export type EventMessageBase = { id: string };
export type TextEventMessage = { type: "text", text: string } & EventMessageBase;
export type ImageEventMessage = { type: "image" } & EventMessageBase;
export type VideoEventMessage = { type: "video" } & EventMessageBase;
export type AudioEventMessage = { type: "audio" } & EventMessageBase;
export type LocationEventMessage = {
type: "location"
title: string,

@@ -75,7 +76,8 @@ address: string,

longitude: number,
};
export type StickerEventMessage = EventMessageBase & {
} & EventMessageBase;
export type StickerEventMessage = {
type: "sticker",
packageId: string,
stickerId: string,
};
} & EventMessageBase;

@@ -87,16 +89,23 @@ export type Message =

export type TextMessage = Typed & { text: string };
export type ImageMessage = Typed & {
export type TextMessage = {
type: "text",
text: string
};
export type ImageMessage = {
type: "image",
originalContentUrl: string,
previewImageUrl: string,
};
export type VideoMessage = Typed & {
export type VideoMessage = {
type: "video",
originalContentUrl: string,
previewImageUrl: string,
};
export type AudioMessage = Typed & {
export type AudioMessage = {
type: "audio",
originalContentUrl: string,
duration: string,
};
export type LocationMessage = Typed & {
export type LocationMessage = {
type: "location",
title: string,

@@ -107,7 +116,9 @@ address: string,

};
export type StickerMessage = Typed & {
export type StickerMessage = {
type: "sticker",
packageId: string,
stickerId: string,
};
export type ImageMapMessage = Typed & {
export type ImageMapMessage = {
type: "image",
baseUrl: string,

@@ -118,3 +129,4 @@ altText: string,

};
export type TemplateMessage = Typed & {
export type TemplateMessage = {
type: "template",
altText: string,

@@ -125,5 +137,5 @@ template: TemplateContent,

export type ImageMapAction = ImageMapURIAction | ImageMapMessageAction;
export type ImageMapActionBase = Typed & { area: ImageMapArea };
export type ImageMapURIAction = ImageMapActionBase & { linkUri: string };
export type ImageMapMessageAction = ImageMapActionBase & { text: string };
export type ImageMapActionBase = { area: ImageMapArea };
export type ImageMapURIAction = { type: "uri", linkUri: string } & ImageMapActionBase;
export type ImageMapMessageAction = { type: "message", text: string } & ImageMapActionBase;

@@ -133,3 +145,4 @@ export type ImageMapArea = { x: number, y: number, width: number, height: number };

export type TemplateContent = TemplateButtons | TemplateConfirm | TemplateCarousel;
export type TemplateButtons = Typed & {
export type TemplateButtons = {
type: "buttons",
thumbnailImageUrl?: string,

@@ -140,7 +153,8 @@ title?: string,

};
export type TemplateConfirm = Typed & {
export type TemplateConfirm = {
type: "confirm",
text: string,
actions: TemplateAction[],
};
export type TemplateCarousel = Typed & { columns: TemplateColumn[] };
export type TemplateCarousel = { type: "carousel", columns: TemplateColumn[] };

@@ -155,6 +169,16 @@ export type TemplateColumn = {

export type TemplateAction = TemplatePostbackAction | TemplateMessageAction | TemplateURIAction;
export type TemplateActionBase = Typed & { label: string };
export type TemplatePostbackAction = TemplateActionBase & { data: string, text?: string };
export type TemplateMessageAction = TemplateActionBase & { text: string };
export type TemplateURIAction = TemplateActionBase & { uri: string };
export type TemplateActionBase = { label: string };
export type TemplatePostbackAction = {
type: "postback",
data: string,
text?: string,
} & TemplateActionBase;
export type TemplateMessageAction = {
type: "message",
text: string,
} & TemplateActionBase;
export type TemplateURIAction = {
type: "template",
uri: string,
} & TemplateActionBase;
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc