-
Notifications
You must be signed in to change notification settings - Fork 411
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support new Membership API and Webhook (#1163)
line/line-openapi#86 # Support new Membership API and Webhook We have implemented and supported new API and Webhook about Membership. ## API to get a list of users who joined the membership You can obtain a list of user IDs for users who have joined the membership of your LINE Official Account by calling `client.getJoinedMembershipUsers(...)`. Documents: https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids ## Membership Webhook We have introduced new Webhook events `MembershipEvent` that indicates that a user has joined, left or renewed a membership of your LINE Official Account. Documents: https://developers.line.biz/en/reference/messaging-api/#membership-event ## For more details For more details, check out the announcement: https://developers.line.biz/en/news/2025/02/13/membership-api/ Co-authored-by: github-actions <github-actions@github.com>
- Loading branch information
1 parent
c1718c6
commit 0678d7e
Showing
14 changed files
with
375 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
lib/messaging-api/model/getJoinedMembershipUsersResponse.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* List of users who have joined the membership | ||
*/ | ||
export type GetJoinedMembershipUsersResponse = { | ||
/** | ||
* A list of user IDs who joined the membership. Users who have not agreed to the bot user agreement, are not following the bot, or are not active will be excluded. If there are no users in the membership, an empty list will be returned. | ||
* | ||
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids">userIds Documentation</a> | ||
*/ | ||
userIds: Array<string> /**/; | ||
/** | ||
* A continuation token to get next remaining membership user IDs. Returned only when there are remaining user IDs that weren\'t returned in the userIds property in the previous request. The continuation token expires in 24 hours (86,400 seconds). | ||
* | ||
* @see <a href="https://developers.line.biz/en/reference/messaging-api/#get-membership-user-ids">next Documentation</a> | ||
*/ | ||
next?: string /**/; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Webhook Type Definition | ||
* Webhook event definition of the LINE Messaging API | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { MembershipContent } from "./membershipContent.js"; | ||
|
||
import { MembershipContentBase } from "./models.js"; | ||
|
||
export type JoinedMembershipContent = MembershipContentBase & { | ||
type: "joined"; | ||
/** | ||
* The ID of the membership that the user joined. This is defined for each membership. | ||
*/ | ||
membershipId: number /**/; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Webhook Type Definition | ||
* Webhook event definition of the LINE Messaging API | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { MembershipContent } from "./membershipContent.js"; | ||
|
||
import { MembershipContentBase } from "./models.js"; | ||
|
||
export type LeftMembershipContent = MembershipContentBase & { | ||
type: "left"; | ||
/** | ||
* The ID of the membership that the user left. This is defined for each membership. | ||
*/ | ||
membershipId: number /**/; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/** | ||
* Webhook Type Definition | ||
* Webhook event definition of the LINE Messaging API | ||
* | ||
* The version of the OpenAPI document: 1.0.0 | ||
* | ||
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { JoinedMembershipContent } from "./models.js"; | ||
import { LeftMembershipContent } from "./models.js"; | ||
import { RenewedMembershipContent } from "./models.js"; | ||
|
||
export type MembershipContent = | ||
| JoinedMembershipContent // joined | ||
| LeftMembershipContent // left | ||
| RenewedMembershipContent; // renewed | ||
|
||
/** | ||
* Content of the membership event. | ||
*/ | ||
export type MembershipContentBase = { | ||
/** | ||
* Type of membership event. | ||
*/ | ||
type: string /**/; | ||
}; |
Oops, something went wrong.