@line/bot-sdk
Advanced tools
Comparing version 6.4.0 to 6.5.0
@@ -0,1 +1,13 @@ | ||
## 6.5.0 (16 Feb 2019) | ||
### Feature | ||
* Add APIs to get number of sent messages (#116) | ||
* Add account link event (#117) | ||
### Misc | ||
* Fix a typo in doc (#119) | ||
## 6.4.0 (19 Nov 2018) | ||
@@ -2,0 +14,0 @@ |
@@ -35,2 +35,5 @@ /// <reference types="node" /> | ||
getLinkToken(userId: string): Promise<string>; | ||
getNumberOfSentReplyMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>; | ||
getNumberOfSentPushMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>; | ||
getNumberOfSentMulticastMessages(date: string): Promise<Types.NumberOfMessagesSentResponse>; | ||
} |
@@ -144,3 +144,18 @@ "use strict"; | ||
} | ||
getNumberOfSentReplyMessages(date) { | ||
return this.http | ||
.get(`/message/delivery/reply?date=${date}`) | ||
.then(checkJSON); | ||
} | ||
getNumberOfSentPushMessages(date) { | ||
return this.http | ||
.get(`/message/delivery/push?date=${date}`) | ||
.then(checkJSON); | ||
} | ||
getNumberOfSentMulticastMessages(date) { | ||
return this.http | ||
.get(`/message/delivery/multicast?date=${date}`) | ||
.then(checkJSON); | ||
} | ||
} | ||
exports.default = Client; |
@@ -37,3 +37,3 @@ export interface Config { | ||
*/ | ||
export declare type WebhookEvent = MessageEvent | FollowEvent | UnfollowEvent | JoinEvent | LeaveEvent | MemberJoinEvent | MemberLeaveEvent | PostbackEvent | BeaconEvent; | ||
export declare type WebhookEvent = MessageEvent | FollowEvent | UnfollowEvent | JoinEvent | LeaveEvent | MemberJoinEvent | MemberLeaveEvent | PostbackEvent | BeaconEvent | AccountLinkEvent; | ||
export declare type EventBase = { | ||
@@ -183,2 +183,15 @@ /** | ||
}; | ||
/** | ||
* Event object for when a user has linked his/her LINE account with a provider's service account. | ||
*/ | ||
export declare type AccountLinkEvent = ReplyableEvent & { | ||
type: "accountLink"; | ||
link: { | ||
result: "ok" | "failed"; | ||
/** | ||
* Specified nonce when verifying the user ID | ||
*/ | ||
nonce: string; | ||
}; | ||
}; | ||
export declare type EventMessage = TextEventMessage | ImageEventMessage | VideoEventMessage | AudioEventMessage | LocationEventMessage | FileEventMessage | StickerEventMessage; | ||
@@ -1468,1 +1481,16 @@ export declare type EventMessageBase = { | ||
} & RichMenu; | ||
export declare type NumberOfMessagesSentResponse = { | ||
/** | ||
* Status of the counting process. One of the following values is returned: | ||
* - `ready`: You can get the number of messages. | ||
* - `unready`: The message counting process for the date specified in date has not been completed yet. | ||
* Retry your request later. Normally, the counting process is completed within the next day. | ||
* - `out_of_service`: The date specified in date is earlier than March 31, 2018, when the operation of the counting system started. | ||
*/ | ||
status: "ready" | "unready" | "out_of_service"; | ||
/** | ||
* The number of messages sent with the Messaging API on the date specified in date. | ||
* The response has this property only when the value of status is `ready`. | ||
*/ | ||
success?: number; | ||
}; |
@@ -216,2 +216,32 @@ import { Readable } from "stream"; | ||
} | ||
public getNumberOfSentReplyMessages( | ||
date: string, | ||
): Promise<Types.NumberOfMessagesSentResponse> { | ||
return this.http | ||
.get<Types.NumberOfMessagesSentResponse>( | ||
`/message/delivery/reply?date=${date}`, | ||
) | ||
.then(checkJSON); | ||
} | ||
public getNumberOfSentPushMessages( | ||
date: string, | ||
): Promise<Types.NumberOfMessagesSentResponse> { | ||
return this.http | ||
.get<Types.NumberOfMessagesSentResponse>( | ||
`/message/delivery/push?date=${date}`, | ||
) | ||
.then(checkJSON); | ||
} | ||
public getNumberOfSentMulticastMessages( | ||
date: string, | ||
): Promise<Types.NumberOfMessagesSentResponse> { | ||
return this.http | ||
.get<Types.NumberOfMessagesSentResponse>( | ||
`/message/delivery/multicast?date=${date}`, | ||
) | ||
.then(checkJSON); | ||
} | ||
} |
@@ -52,3 +52,4 @@ export interface Config { | ||
| PostbackEvent | ||
| BeaconEvent; | ||
| BeaconEvent | ||
| AccountLinkEvent; | ||
@@ -199,2 +200,17 @@ export type EventBase = { | ||
/** | ||
* Event object for when a user has linked his/her LINE account with a provider's service account. | ||
*/ | ||
export type AccountLinkEvent = ReplyableEvent & { | ||
type: "accountLink"; | ||
link: { | ||
result: "ok" | "failed"; | ||
/** | ||
* Specified nonce when verifying the user ID | ||
*/ | ||
nonce: string; | ||
}; | ||
}; | ||
export type EventMessage = | ||
@@ -1608,1 +1624,17 @@ | TextEventMessage | ||
export type RichMenuResponse = { richMenuId: string } & RichMenu; | ||
export type NumberOfMessagesSentResponse = { | ||
/** | ||
* Status of the counting process. One of the following values is returned: | ||
* - `ready`: You can get the number of messages. | ||
* - `unready`: The message counting process for the date specified in date has not been completed yet. | ||
* Retry your request later. Normally, the counting process is completed within the next day. | ||
* - `out_of_service`: The date specified in date is earlier than March 31, 2018, when the operation of the counting system started. | ||
*/ | ||
status: "ready" | "unready" | "out_of_service"; | ||
/** | ||
* The number of messages sent with the Messaging API on the date specified in date. | ||
* The response has this property only when the value of status is `ready`. | ||
*/ | ||
success?: number; | ||
}; |
{ | ||
"name": "@line/bot-sdk", | ||
"version": "6.4.0", | ||
"version": "6.5.0", | ||
"description": "Node.js SDK for LINE Messaging API", | ||
@@ -54,7 +54,7 @@ "engines": { | ||
"mocha": "^5.2.0", | ||
"nyc": "^12.0.2", | ||
"nyc": "^13.3.0", | ||
"prettier": "^1.15.2", | ||
"ts-node": "^3.3.0", | ||
"typescript": "^3.1.6", | ||
"vuepress": "^0.14.2" | ||
"vuepress": "^0.14.8" | ||
}, | ||
@@ -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
148966
3966