├── .editorconfig ├── .github ├── ISSUE_TEMPLATE.md ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── feature_request.md │ └── question.md ├── release.yml ├── scripts │ └── check-eol-newrelease.cjs └── workflows │ ├── check-eol-newrelease.yml │ ├── close-issue.yml │ ├── create-draft-release.yml │ ├── deploy-doc.yml │ ├── generate-code.yml │ ├── issue-label.yml │ ├── release.yml │ └── test.yml ├── .gitignore ├── .gitmodules ├── .prettierrc.json ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── docs ├── .gitignore ├── .vitepress │ ├── .gitignore │ ├── config.ts │ └── utils.ts ├── getting-started.md ├── getting-started │ ├── basic-usage.md │ ├── install.md │ └── requirements.md ├── guide.md ├── guide │ ├── client.md │ ├── typescript.md │ └── webhook.md └── public │ └── favicon.ico ├── examples ├── echo-bot-esm │ ├── README.md │ ├── index.js │ ├── package-lock.json │ └── package.json ├── echo-bot-ts-cjs │ ├── README.md │ ├── environment.d.ts │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ └── tsconfig.json ├── echo-bot-ts-esm │ ├── README.md │ ├── environment.d.ts │ ├── index.ts │ ├── package-lock.json │ ├── package.json │ └── tsconfig.json ├── echo-bot │ ├── README.md │ ├── index.js │ ├── package-lock.json │ └── package.json ├── kitchensink │ ├── .gitignore │ ├── README.md │ ├── downloaded │ │ └── .gitkeep │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── static │ │ ├── buttons │ │ └── 1040.jpg │ │ ├── imagemap │ │ ├── preview.jpg │ │ └── video.mp4 │ │ └── rich │ │ ├── 240 │ │ ├── 300 │ │ ├── 460 │ │ ├── 700 │ │ └── 1040 └── rich-menu │ ├── README.md │ ├── index.js │ ├── package-lock.json │ ├── package.json │ └── public │ ├── richmenu-a.png │ └── richmenu-b.png ├── generate-code.py ├── generator ├── .gitignore ├── README.md ├── pom.xml └── src │ ├── main │ ├── java │ │ └── line │ │ │ └── bot │ │ │ └── generator │ │ │ ├── LineBotSdkNodejsGeneratorGenerator.java │ │ │ └── pebble │ │ │ ├── EndpointFunction.java │ │ │ ├── MyPebbleExtension.java │ │ │ └── PebbleTemplateAdapter.java │ └── resources │ │ ├── META-INF │ │ └── services │ │ │ ├── org.openapitools.codegen.CodegenConfig │ │ │ └── org.openapitools.codegen.api.TemplatingEngineAdapter │ │ └── line-bot-sdk-nodejs-generator │ │ ├── api-all.pebble │ │ ├── api-single.pebble │ │ ├── api.pebble │ │ ├── apiBody │ │ ├── multipart.pebble │ │ └── normal.pebble │ │ ├── api_test.pebble │ │ ├── licenseInfo.pebble │ │ ├── model.pebble │ │ └── models.pebble │ └── test │ └── java │ └── line │ └── bot │ └── generator │ └── LineBotSdkNodejsGeneratorGeneratorTest.java ├── lib ├── channel-access-token │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── channelAccessTokenClient.ts │ ├── model │ │ ├── channelAccessTokenKeyIdsResponse.ts │ │ ├── errorResponse.ts │ │ ├── issueChannelAccessTokenResponse.ts │ │ ├── issueShortLivedChannelAccessTokenResponse.ts │ │ ├── issueStatelessChannelAccessTokenResponse.ts │ │ ├── models.ts │ │ └── verifyChannelAccessTokenResponse.ts │ └── tests │ │ └── api │ │ └── ChannelAccessTokenClientTest.spec.ts ├── client.ts ├── endpoints.ts ├── exceptions.ts ├── http-axios.ts ├── http-fetch.ts ├── index.ts ├── insight │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── insightClient.ts │ ├── model │ │ ├── ageTile.ts │ │ ├── appTypeTile.ts │ │ ├── areaTile.ts │ │ ├── errorDetail.ts │ │ ├── errorResponse.ts │ │ ├── genderTile.ts │ │ ├── getFriendsDemographicsResponse.ts │ │ ├── getMessageEventResponse.ts │ │ ├── getMessageEventResponseClick.ts │ │ ├── getMessageEventResponseMessage.ts │ │ ├── getMessageEventResponseOverview.ts │ │ ├── getNumberOfFollowersResponse.ts │ │ ├── getNumberOfMessageDeliveriesResponse.ts │ │ ├── getStatisticsPerUnitResponse.ts │ │ ├── getStatisticsPerUnitResponseClick.ts │ │ ├── getStatisticsPerUnitResponseMessage.ts │ │ ├── getStatisticsPerUnitResponseOverview.ts │ │ ├── models.ts │ │ └── subscriptionPeriodTile.ts │ └── tests │ │ └── api │ │ └── InsightClientTest.spec.ts ├── liff │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── liffClient.ts │ ├── model │ │ ├── addLiffAppRequest.ts │ │ ├── addLiffAppResponse.ts │ │ ├── getAllLiffAppsResponse.ts │ │ ├── liffApp.ts │ │ ├── liffBotPrompt.ts │ │ ├── liffFeatures.ts │ │ ├── liffScope.ts │ │ ├── liffView.ts │ │ ├── models.ts │ │ ├── updateLiffAppRequest.ts │ │ └── updateLiffView.ts │ └── tests │ │ └── api │ │ └── LiffClientTest.spec.ts ├── manage-audience │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ ├── manageAudienceBlobClient.ts │ │ └── manageAudienceClient.ts │ ├── model │ │ ├── adaccount.ts │ │ ├── addAudienceToAudienceGroupRequest.ts │ │ ├── audience.ts │ │ ├── audienceGroup.ts │ │ ├── audienceGroupCreateRoute.ts │ │ ├── audienceGroupFailedType.ts │ │ ├── audienceGroupJob.ts │ │ ├── audienceGroupJobFailedType.ts │ │ ├── audienceGroupJobStatus.ts │ │ ├── audienceGroupJobType.ts │ │ ├── audienceGroupPermission.ts │ │ ├── audienceGroupStatus.ts │ │ ├── audienceGroupType.ts │ │ ├── createAudienceGroupRequest.ts │ │ ├── createAudienceGroupResponse.ts │ │ ├── createClickBasedAudienceGroupRequest.ts │ │ ├── createClickBasedAudienceGroupResponse.ts │ │ ├── createImpBasedAudienceGroupRequest.ts │ │ ├── createImpBasedAudienceGroupResponse.ts │ │ ├── detailedOwner.ts │ │ ├── errorDetail.ts │ │ ├── errorResponse.ts │ │ ├── getAudienceDataResponse.ts │ │ ├── getAudienceGroupsResponse.ts │ │ ├── getSharedAudienceDataResponse.ts │ │ ├── getSharedAudienceGroupsResponse.ts │ │ ├── models.ts │ │ └── updateAudienceGroupDescriptionRequest.ts │ └── tests │ │ └── api │ │ ├── ManageAudienceBlobClientTest.spec.ts │ │ └── ManageAudienceClientTest.spec.ts ├── messaging-api │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ ├── messagingApiBlobClient.ts │ │ └── messagingApiClient.ts │ ├── model │ │ ├── action.ts │ │ ├── ageDemographic.ts │ │ ├── ageDemographicFilter.ts │ │ ├── allMentionTarget.ts │ │ ├── altUri.ts │ │ ├── appTypeDemographic.ts │ │ ├── appTypeDemographicFilter.ts │ │ ├── areaDemographic.ts │ │ ├── areaDemographicFilter.ts │ │ ├── audienceRecipient.ts │ │ ├── audioMessage.ts │ │ ├── botInfoResponse.ts │ │ ├── broadcastRequest.ts │ │ ├── buttonsTemplate.ts │ │ ├── cameraAction.ts │ │ ├── cameraRollAction.ts │ │ ├── carouselColumn.ts │ │ ├── carouselTemplate.ts │ │ ├── chatReference.ts │ │ ├── clipboardAction.ts │ │ ├── clipboardImagemapAction.ts │ │ ├── confirmTemplate.ts │ │ ├── createRichMenuAliasRequest.ts │ │ ├── datetimePickerAction.ts │ │ ├── demographicFilter.ts │ │ ├── emoji.ts │ │ ├── emojiSubstitutionObject.ts │ │ ├── errorDetail.ts │ │ ├── errorResponse.ts │ │ ├── filter.ts │ │ ├── flexBlockStyle.ts │ │ ├── flexBox.ts │ │ ├── flexBoxBackground.ts │ │ ├── flexBoxBorderWidth.ts │ │ ├── flexBoxCornerRadius.ts │ │ ├── flexBoxLinearGradient.ts │ │ ├── flexBoxPadding.ts │ │ ├── flexBoxSpacing.ts │ │ ├── flexBubble.ts │ │ ├── flexBubbleStyles.ts │ │ ├── flexButton.ts │ │ ├── flexCarousel.ts │ │ ├── flexComponent.ts │ │ ├── flexContainer.ts │ │ ├── flexFiller.ts │ │ ├── flexIcon.ts │ │ ├── flexIconSize.ts │ │ ├── flexImage.ts │ │ ├── flexImageSize.ts │ │ ├── flexMargin.ts │ │ ├── flexMessage.ts │ │ ├── flexOffset.ts │ │ ├── flexSeparator.ts │ │ ├── flexSpan.ts │ │ ├── flexSpanSize.ts │ │ ├── flexText.ts │ │ ├── flexTextFontSize.ts │ │ ├── flexVideo.ts │ │ ├── genderDemographic.ts │ │ ├── genderDemographicFilter.ts │ │ ├── getAggregationUnitNameListResponse.ts │ │ ├── getAggregationUnitUsageResponse.ts │ │ ├── getFollowersResponse.ts │ │ ├── getJoinedMembershipUsersResponse.ts │ │ ├── getMembershipSubscriptionResponse.ts │ │ ├── getMessageContentTranscodingResponse.ts │ │ ├── getWebhookEndpointResponse.ts │ │ ├── groupMemberCountResponse.ts │ │ ├── groupSummaryResponse.ts │ │ ├── groupUserProfileResponse.ts │ │ ├── imageCarouselColumn.ts │ │ ├── imageCarouselTemplate.ts │ │ ├── imageMessage.ts │ │ ├── imagemapAction.ts │ │ ├── imagemapArea.ts │ │ ├── imagemapBaseSize.ts │ │ ├── imagemapExternalLink.ts │ │ ├── imagemapMessage.ts │ │ ├── imagemapVideo.ts │ │ ├── issueLinkTokenResponse.ts │ │ ├── limit.ts │ │ ├── locationAction.ts │ │ ├── locationMessage.ts │ │ ├── markMessagesAsReadRequest.ts │ │ ├── membersIdsResponse.ts │ │ ├── membership.ts │ │ ├── membershipListResponse.ts │ │ ├── mentionSubstitutionObject.ts │ │ ├── mentionTarget.ts │ │ ├── message.ts │ │ ├── messageAction.ts │ │ ├── messageImagemapAction.ts │ │ ├── messageQuotaResponse.ts │ │ ├── models.ts │ │ ├── multicastRequest.ts │ │ ├── narrowcastProgressResponse.ts │ │ ├── narrowcastRequest.ts │ │ ├── numberOfMessagesResponse.ts │ │ ├── operatorDemographicFilter.ts │ │ ├── operatorRecipient.ts │ │ ├── pnpMessagesRequest.ts │ │ ├── postbackAction.ts │ │ ├── pushMessageRequest.ts │ │ ├── pushMessageResponse.ts │ │ ├── quickReply.ts │ │ ├── quickReplyItem.ts │ │ ├── quotaConsumptionResponse.ts │ │ ├── quotaType.ts │ │ ├── recipient.ts │ │ ├── redeliveryRecipient.ts │ │ ├── replyMessageRequest.ts │ │ ├── replyMessageResponse.ts │ │ ├── richMenuAliasListResponse.ts │ │ ├── richMenuAliasResponse.ts │ │ ├── richMenuArea.ts │ │ ├── richMenuBatchLinkOperation.ts │ │ ├── richMenuBatchOperation.ts │ │ ├── richMenuBatchProgressPhase.ts │ │ ├── richMenuBatchProgressResponse.ts │ │ ├── richMenuBatchRequest.ts │ │ ├── richMenuBatchUnlinkAllOperation.ts │ │ ├── richMenuBatchUnlinkOperation.ts │ │ ├── richMenuBounds.ts │ │ ├── richMenuBulkLinkRequest.ts │ │ ├── richMenuBulkUnlinkRequest.ts │ │ ├── richMenuIdResponse.ts │ │ ├── richMenuListResponse.ts │ │ ├── richMenuRequest.ts │ │ ├── richMenuResponse.ts │ │ ├── richMenuSize.ts │ │ ├── richMenuSwitchAction.ts │ │ ├── roomMemberCountResponse.ts │ │ ├── roomUserProfileResponse.ts │ │ ├── sender.ts │ │ ├── sentMessage.ts │ │ ├── setWebhookEndpointRequest.ts │ │ ├── showLoadingAnimationRequest.ts │ │ ├── stickerMessage.ts │ │ ├── subscribedMembershipPlan.ts │ │ ├── subscribedMembershipUser.ts │ │ ├── subscription.ts │ │ ├── subscriptionPeriodDemographic.ts │ │ ├── subscriptionPeriodDemographicFilter.ts │ │ ├── substitutionObject.ts │ │ ├── template.ts │ │ ├── templateImageAspectRatio.ts │ │ ├── templateImageSize.ts │ │ ├── templateMessage.ts │ │ ├── testWebhookEndpointRequest.ts │ │ ├── testWebhookEndpointResponse.ts │ │ ├── textMessage.ts │ │ ├── textMessageV2.ts │ │ ├── uRIAction.ts │ │ ├── uRIImagemapAction.ts │ │ ├── updateRichMenuAliasRequest.ts │ │ ├── userMentionTarget.ts │ │ ├── userProfileResponse.ts │ │ ├── validateMessageRequest.ts │ │ └── videoMessage.ts │ └── tests │ │ └── api │ │ ├── MessagingApiBlobClientTest.spec.ts │ │ └── MessagingApiClientTest.spec.ts ├── middleware.ts ├── module-attach │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── lineModuleAttachClient.ts │ ├── model │ │ ├── attachModuleResponse.ts │ │ └── models.ts │ └── tests │ │ └── api │ │ └── LineModuleAttachClientTest.spec.ts ├── module │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── lineModuleClient.ts │ ├── model │ │ ├── acquireChatControlRequest.ts │ │ ├── detachModuleRequest.ts │ │ ├── getModulesResponse.ts │ │ ├── models.ts │ │ └── moduleBot.ts │ └── tests │ │ └── api │ │ └── LineModuleClientTest.spec.ts ├── shop │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ │ ├── FILES │ │ └── VERSION │ ├── api.ts │ ├── api │ │ ├── apis.ts │ │ └── shopClient.ts │ ├── model │ │ ├── errorResponse.ts │ │ ├── missionStickerRequest.ts │ │ └── models.ts │ └── tests │ │ └── api │ │ └── ShopClientTest.spec.ts ├── types.ts ├── utils.ts ├── validate-signature.ts ├── version.ts └── webhook │ ├── .openapi-generator-ignore │ ├── .openapi-generator │ ├── FILES │ └── VERSION │ ├── api.ts │ └── model │ ├── accountLinkEvent.ts │ ├── actionResult.ts │ ├── activatedEvent.ts │ ├── allMentionee.ts │ ├── attachedModuleContent.ts │ ├── audioMessageContent.ts │ ├── beaconContent.ts │ ├── beaconEvent.ts │ ├── botResumedEvent.ts │ ├── botSuspendedEvent.ts │ ├── callbackRequest.ts │ ├── chatControl.ts │ ├── contentProvider.ts │ ├── deactivatedEvent.ts │ ├── deliveryContext.ts │ ├── detachedModuleContent.ts │ ├── emoji.ts │ ├── event.ts │ ├── eventMode.ts │ ├── fileMessageContent.ts │ ├── followDetail.ts │ ├── followEvent.ts │ ├── groupSource.ts │ ├── imageMessageContent.ts │ ├── imageSet.ts │ ├── joinEvent.ts │ ├── joinedMembers.ts │ ├── joinedMembershipContent.ts │ ├── leaveEvent.ts │ ├── leftMembers.ts │ ├── leftMembershipContent.ts │ ├── linkContent.ts │ ├── linkThingsContent.ts │ ├── locationMessageContent.ts │ ├── memberJoinedEvent.ts │ ├── memberLeftEvent.ts │ ├── membershipContent.ts │ ├── membershipEvent.ts │ ├── mention.ts │ ├── mentionee.ts │ ├── messageContent.ts │ ├── messageEvent.ts │ ├── models.ts │ ├── moduleContent.ts │ ├── moduleEvent.ts │ ├── pnpDelivery.ts │ ├── pnpDeliveryCompletionEvent.ts │ ├── postbackContent.ts │ ├── postbackEvent.ts │ ├── renewedMembershipContent.ts │ ├── roomSource.ts │ ├── scenarioResult.ts │ ├── scenarioResultThingsContent.ts │ ├── source.ts │ ├── stickerMessageContent.ts │ ├── textMessageContent.ts │ ├── thingsContent.ts │ ├── thingsEvent.ts │ ├── unfollowEvent.ts │ ├── unlinkThingsContent.ts │ ├── unsendDetail.ts │ ├── unsendEvent.ts │ ├── userMentionee.ts │ ├── userSource.ts │ ├── videoMessageContent.ts │ ├── videoPlayComplete.ts │ └── videoPlayCompleteEvent.ts ├── package-lock.json ├── package.json ├── renovate.json5 ├── scripts ├── update-version.mjs └── workaround-for-rollup.mjs ├── test ├── client.spec.ts ├── headers.spec.ts ├── helpers │ ├── line-icon.png │ ├── parse-form.spec.ts │ ├── parse-form.ts │ ├── stream.ts │ ├── stream.txt │ └── test-server.ts ├── http-axios.spec.ts ├── http-fetch.spec.ts ├── libs-channelAccessToken.spec.ts ├── libs-manageAudience.spec.ts ├── libs-messagingApi.spec.ts ├── libs-shop.spec.ts ├── libs-webhook.spec.ts ├── middleware.spec.ts ├── utils.spec.ts └── validate-signature.spec.ts ├── tsconfig.cjs.json ├── tsconfig.json └── vite.config.ts /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | indent_style = space 5 | indent_size = 2 6 | end_of_line = lf 7 | charset = utf-8 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | 11 | [*.md] 12 | trim_trailing_whitespace = false 13 | 14 | [*.py] 15 | indent_size = 4 16 | 17 | [*.java] 18 | indent_size = 4 19 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## Do this before creating an issue 2 | 3 | - Check our [developer documentation](https://developers.line.biz/en/docs/) and 4 | [FAQ](https://developers.line.biz/en/faq/) page for more 5 | information on LINE bots and the Messaging API 6 | - Make sure your issue is **related to** the Node.js SDK. 7 | - Note that we don't provide technical support 8 | 9 | ## When creating an issue 10 | 11 | - Provide detailed information about the issue you had with the SDK 12 | - Provide logs if possible 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: "Feature Request" 5 | 6 | --- 7 | 8 | ## Feature Request 9 | 10 | 11 | **Is your feature request related to a problem? Please describe.** 12 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 13 | 14 | **Describe the solution you'd like** 15 | A clear and concise description of what you want to happen. 16 | 17 | **Describe alternatives you've considered** 18 | A clear and concise description of any alternative solutions or features you've considered. 19 | 20 | **Additional context** 21 | Add any other context or screenshots about the feature request here. 22 | -------------------------------------------------------------------------------- /.github/release.yml: -------------------------------------------------------------------------------- 1 | # https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes 2 | changelog: 3 | categories: 4 | - title: Breaking Changes 5 | labels: 6 | - breaking-change 7 | - title: line-openapi updates 8 | labels: 9 | - line-openapi-update 10 | - title: New Features 11 | labels: 12 | - new-features 13 | - title: Bug fix 14 | labels: 15 | - bug-fix 16 | - title: Dependency updates 17 | labels: 18 | - dependency upgrade 19 | exclude: 20 | labels: 21 | - line-openapi-update 22 | - title: Other Changes 23 | labels: 24 | - "*" 25 | -------------------------------------------------------------------------------- /.github/workflows/issue-label.yml: -------------------------------------------------------------------------------- 1 | name: Label issue 2 | 3 | on: 4 | issues: 5 | types: 6 | - opened 7 | - reopened 8 | - closed 9 | 10 | jobs: 11 | label-issues: 12 | runs-on: ubuntu-latest 13 | permissions: 14 | issues: write 15 | steps: 16 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 17 | 18 | - name: Add label on issue open 19 | if: github.event.action == 'opened' || github.event.action == 'reopened' 20 | run: | 21 | gh issue edit ${{ github.event.issue.number }} \ 22 | --add-label "untriaged" \ 23 | env: 24 | GH_TOKEN: ${{ github.token }} 25 | 26 | - name: Remove label on issue close 27 | if: github.event.action == 'closed' 28 | run: | 29 | gh issue edit ${{ github.event.issue.number }} \ 30 | --remove-label "untriaged" 31 | env: 32 | GH_TOKEN: ${{ github.token }} 33 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "line-openapi"] 2 | path = line-openapi 3 | url = git@github.com:line/line-openapi.git 4 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "parser": "typescript", 3 | "trailingComma": "all", 4 | "arrowParens": "avoid" 5 | } 6 | -------------------------------------------------------------------------------- /docs/.gitignore: -------------------------------------------------------------------------------- 1 | /.vuepress/.cache/ 2 | /.vuepress/.temp/ 3 | /apidocs/ 4 | 5 | /CONTRIBUTING.md 6 | /index.md 7 | 8 | -------------------------------------------------------------------------------- /docs/.vitepress/.gitignore: -------------------------------------------------------------------------------- 1 | /cache/ 2 | -------------------------------------------------------------------------------- /docs/.vitepress/utils.ts: -------------------------------------------------------------------------------- 1 | import fs from 'node:fs'; 2 | import path from 'node:path'; 3 | import {fileURLToPath} from 'node:url'; 4 | import {dirname} from 'node:path'; 5 | 6 | // __dirname is not available in ESM, so we need to derive it 7 | const __filename = fileURLToPath(import.meta.url); 8 | const __dirname = dirname(__filename); 9 | 10 | function copyFile(sourceFilename, targetFilename) { 11 | const sourcePath = path.join(__dirname, '../../', sourceFilename); 12 | const targetPath = path.join(__dirname, '../', targetFilename); 13 | const md = fs.readFileSync(sourcePath, 'utf-8'); 14 | fs.writeFileSync(targetPath, md); 15 | } 16 | 17 | function rewriteFile(filename, regex, replacement) { 18 | console.log("Rewriting file: ", filename, " with regex: ", regex, " and replacement: ", replacement) 19 | const content = fs.readFileSync(path.join(__dirname, filename), 'utf-8'); 20 | const newContent = content.replace(regex, replacement); 21 | fs.writeFileSync(path.join(__dirname, filename), newContent); 22 | } 23 | 24 | export { 25 | copyFile, 26 | rewriteFile 27 | }; 28 | -------------------------------------------------------------------------------- /docs/getting-started.md: -------------------------------------------------------------------------------- 1 | # Getting Started 2 | 3 | * [Requirements](getting-started/requirements.md) 4 | * [Install](getting-started/install.md) 5 | * [Basic Usage](getting-started/basic-usage.md) 6 | -------------------------------------------------------------------------------- /docs/getting-started/install.md: -------------------------------------------------------------------------------- 1 | # Install 2 | 3 | Please install via [npm](https://www.npmjs.com/). 4 | 5 | ```bash 6 | $ npm install @line/bot-sdk 7 | ``` 8 | 9 | You can build from source. Please clone the repository and run the following 10 | scripts to build. 11 | 12 | ``` bash 13 | $ git clone https://github.com/line/line-bot-sdk-nodejs 14 | $ cd line-bot-sdk-nodejs 15 | $ npm install 16 | $ npm run build 17 | ``` 18 | 19 | The built result will be placed in `dist/`. 20 | 21 | For the details of development, please refer to [Contributing](../CONTRIBUTING.md). 22 | -------------------------------------------------------------------------------- /docs/getting-started/requirements.md: -------------------------------------------------------------------------------- 1 | # Requirements 2 | 3 | * **Node.js** >= 20. 4 | * It uses ES2022. 5 | * [**npm**](https://www.npmjs.com/), preferably >=10 6 | 7 | Other dependencies are installed via npm, and do not need to be pre-installed. 8 | -------------------------------------------------------------------------------- /docs/guide.md: -------------------------------------------------------------------------------- 1 | # Guide 2 | 3 | * [Webhook](guide/webhook.md) 4 | * [Client](guide/client.md) 5 | * [TypeScript](guide/typescript.md) 6 | -------------------------------------------------------------------------------- /docs/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/docs/public/favicon.ico -------------------------------------------------------------------------------- /examples/echo-bot-esm/README.md: -------------------------------------------------------------------------------- 1 | # Echo Bot (ES Modules) 2 | 3 | An example LINE bot just to echo messages written in ES modules. 4 | 5 | ## How to use 6 | 7 | ### Install deps 8 | 9 | ``` shell 10 | $ npm build-sdk 11 | $ npm install 12 | ``` 13 | 14 | ### Configuration 15 | 16 | ``` shell 17 | $ export CHANNEL_SECRET=YOUR_CHANNEL_SECRET 18 | $ export CHANNEL_ACCESS_TOKEN=YOUR_CHANNEL_ACCESS_TOKEN 19 | $ export PORT=1234 20 | ``` 21 | 22 | ### Run 23 | 24 | ``` shell 25 | $ node . 26 | ``` 27 | 28 | ## Webhook URL 29 | 30 | ``` 31 | https://your.base.url/callback 32 | ``` 33 | -------------------------------------------------------------------------------- /examples/echo-bot-esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "echo-bot-esm", 3 | "version": "0.0.0", 4 | "description": "An example LINE bot just to echo messages written in ES modules", 5 | "main": "index.js", 6 | "scripts": { 7 | "build-sdk": "cd ../../; npm i; npm run build", 8 | "start": "node ." 9 | }, 10 | "dependencies": { 11 | "@line/bot-sdk": "../../", 12 | "express": "^4.17.3" 13 | }, 14 | "type": "module" 15 | } 16 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-cjs/environment.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | namespace NodeJS { 3 | interface ProcessEnv { 4 | CHANNEL_ACCESS_TOKEN: string; 5 | CHANNEL_SECRET: string; 6 | PORT: string; 7 | } 8 | } 9 | } 10 | 11 | export {}; 12 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-cjs/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "echo-bot-ts-cjs", 3 | "version": "0.0.0", 4 | "description": "A LINE Messaging API SDK for Node.js bot example using TypeScript with CJS", 5 | "main": "./dist/index.js", 6 | "scripts": { 7 | "clean": "rimraf ./dist", 8 | "build": "npm run clean && tsc", 9 | "build-sdk": "cd ../../; npm i; npm run build", 10 | "start": "node dist/index.js" 11 | }, 12 | "dependencies": { 13 | "@line/bot-sdk": "../../", 14 | "express": "^4.18.2" 15 | }, 16 | "devDependencies": { 17 | "@types/express": "^4.17.17", 18 | "@types/node": "^20.6.3", 19 | "rimraf": "^5.0.1", 20 | "typescript": "^5.2.2" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-cjs/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "commonjs", 5 | "outDir": "./dist", 6 | "strict": true, 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true 9 | }, 10 | "exclude": ["node_modules"] 11 | } 12 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-esm/environment.d.ts: -------------------------------------------------------------------------------- 1 | declare global { 2 | namespace NodeJS { 3 | interface ProcessEnv { 4 | CHANNEL_ACCESS_TOKEN: string; 5 | CHANNEL_SECRET: string; 6 | PORT: string; 7 | } 8 | } 9 | } 10 | 11 | export {}; 12 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-esm/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "echo-bot-ts-esm", 3 | "version": "0.0.0", 4 | "description": "A LINE Messaging API SDK for Node.js bot example using TypeScript with ESM", 5 | "type": "module", 6 | "main": "./dist/index.js", 7 | "scripts": { 8 | "clean": "rimraf ./dist", 9 | "build": "npm run clean && tsc", 10 | "build-sdk": "cd ../../; npm i; npm run build", 11 | "start": "node dist/index.js" 12 | }, 13 | "dependencies": { 14 | "@line/bot-sdk": "../../", 15 | "express": "^4.18.2" 16 | }, 17 | "devDependencies": { 18 | "@types/express": "^4.17.17", 19 | "@types/node": "^20.6.3", 20 | "rimraf": "^5.0.1", 21 | "typescript": "^5.2.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /examples/echo-bot-ts-esm/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2022", 4 | "module": "NodeNext", 5 | "moduleResolution": "NodeNext", 6 | "outDir": "./dist", 7 | "esModuleInterop": true, 8 | "forceConsistentCasingInFileNames": true 9 | }, 10 | "exclude": ["node_modules"] 11 | } 12 | -------------------------------------------------------------------------------- /examples/echo-bot/README.md: -------------------------------------------------------------------------------- 1 | # Echo Bot (CommonJS) 2 | 3 | An example LINE bot just to echo messages written in CommonJS. 4 | 5 | ## How to use 6 | 7 | ### Install deps 8 | 9 | ``` shell 10 | $ npm build-sdk 11 | $ npm install 12 | ``` 13 | 14 | ### Configuration 15 | 16 | ``` shell 17 | $ export CHANNEL_SECRET=YOUR_CHANNEL_SECRET 18 | $ export CHANNEL_ACCESS_TOKEN=YOUR_CHANNEL_ACCESS_TOKEN 19 | $ export PORT=1234 20 | ``` 21 | 22 | ### Run 23 | 24 | ``` shell 25 | $ node . 26 | ``` 27 | 28 | ## Webhook URL 29 | 30 | ``` 31 | https://your.base.url/callback 32 | ``` 33 | -------------------------------------------------------------------------------- /examples/echo-bot/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "echo-bot", 3 | "version": "0.0.0", 4 | "description": "An example LINE bot just to echo messages written in CommonJS", 5 | "main": "index.js", 6 | "scripts": { 7 | "build-sdk": "cd ../../; npm i; npm run build", 8 | "start": "node ." 9 | }, 10 | "dependencies": { 11 | "@line/bot-sdk": "../../", 12 | "express": "^4.17.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /examples/kitchensink/.gitignore: -------------------------------------------------------------------------------- 1 | /downloaded/* 2 | !/downloaded/.gitkeep 3 | -------------------------------------------------------------------------------- /examples/kitchensink/downloaded/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/downloaded/.gitkeep -------------------------------------------------------------------------------- /examples/kitchensink/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "kitchensink", 3 | "version": "0.0.0", 4 | "description": "A kitchen-sink LINE bot example", 5 | "main": "index.js", 6 | "scripts": { 7 | "build-sdk": "cd ../../; npm i; npm run build", 8 | "start": "node ." 9 | }, 10 | "dependencies": { 11 | "@line/bot-sdk": "../../", 12 | "express": "^4.18.2", 13 | "ngrok": "^5.0.0-beta.2" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /examples/kitchensink/static/buttons/1040.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/buttons/1040.jpg -------------------------------------------------------------------------------- /examples/kitchensink/static/imagemap/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/imagemap/preview.jpg -------------------------------------------------------------------------------- /examples/kitchensink/static/imagemap/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/imagemap/video.mp4 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/1040: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/rich/1040 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/240: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/rich/240 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/300: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/rich/300 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/460: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/rich/460 -------------------------------------------------------------------------------- /examples/kitchensink/static/rich/700: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/kitchensink/static/rich/700 -------------------------------------------------------------------------------- /examples/rich-menu/README.md: -------------------------------------------------------------------------------- 1 | # rich menu 2 | 3 | [Using rich menus](https://developers.line.biz/en/docs/messaging-api/using-rich-menus/) 4 | 5 | ## How to use 6 | 7 | ### Install deps 8 | 9 | ``` shell 10 | $ npm run build-sdk 11 | $ npm install 12 | ``` 13 | 14 | ### Configuration 15 | 16 | ``` shell 17 | $ export CHANNEL_SECRET=YOUR_CHANNEL_SECRET 18 | $ export CHANNEL_ACCESS_TOKEN=YOUR_CHANNEL_ACCESS_TOKEN 19 | ``` 20 | 21 | ### Run 22 | 23 | ``` shell 24 | $ node . 25 | ``` 26 | -------------------------------------------------------------------------------- /examples/rich-menu/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "rich-menu", 3 | "version": "0.0.0", 4 | "description": "An example LINE bot just to rich menu", 5 | "main": "index.js", 6 | "scripts": { 7 | "build-sdk": "cd ../../; npm i; npm run build", 8 | "start": "node ." 9 | }, 10 | "dependencies": { 11 | "@line/bot-sdk": "../../" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /examples/rich-menu/public/richmenu-a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/rich-menu/public/richmenu-a.png -------------------------------------------------------------------------------- /examples/rich-menu/public/richmenu-b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/examples/rich-menu/public/richmenu-b.png -------------------------------------------------------------------------------- /generator/.gitignore: -------------------------------------------------------------------------------- 1 | target/ 2 | .vscode/ 3 | /out/ 4 | /dependency-reduced-pom.xml 5 | -------------------------------------------------------------------------------- /generator/src/main/java/line/bot/generator/pebble/EndpointFunction.java: -------------------------------------------------------------------------------- 1 | package line.bot.generator.pebble; 2 | 3 | import io.pebbletemplates.pebble.extension.Function; 4 | import io.pebbletemplates.pebble.template.EvaluationContext; 5 | import io.pebbletemplates.pebble.template.PebbleTemplate; 6 | 7 | import java.util.Collections; 8 | import java.util.List; 9 | import java.util.Map; 10 | 11 | public class EndpointFunction implements Function { 12 | @Override 13 | public List getArgumentNames() { 14 | return Collections.singletonList("className"); 15 | } 16 | 17 | @Override 18 | public Object execute(Map args, PebbleTemplate self, EvaluationContext context, int lineNumber) { 19 | String className = (String) args.get("className"); 20 | if (className.equals("LineModuleAttachClient")) { 21 | return "https://manager.line.biz"; 22 | } else if (className.contains("Blob")) { 23 | return "https://api-data.line.me"; 24 | } else { 25 | return "https://api.line.me"; 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /generator/src/main/java/line/bot/generator/pebble/MyPebbleExtension.java: -------------------------------------------------------------------------------- 1 | package line.bot.generator.pebble; 2 | 3 | import io.pebbletemplates.pebble.extension.AbstractExtension; 4 | import io.pebbletemplates.pebble.extension.Function; 5 | import line.bot.generator.pebble.EndpointFunction; 6 | 7 | import java.util.HashMap; 8 | import java.util.Map; 9 | 10 | public class MyPebbleExtension extends AbstractExtension { 11 | @Override 12 | public Map getFunctions() { 13 | HashMap map = new HashMap<>(); 14 | map.put("endpoint", new EndpointFunction()); 15 | return map; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig: -------------------------------------------------------------------------------- 1 | line.bot.generator.LineBotSdkNodejsGeneratorGenerator -------------------------------------------------------------------------------- /generator/src/main/resources/META-INF/services/org.openapitools.codegen.api.TemplatingEngineAdapter: -------------------------------------------------------------------------------- 1 | line.bot.generator.pebble.PebbleTemplateAdapter 2 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-nodejs-generator/api-all.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="apiInfo" type="org.openapitools.codegen.model.ApiInfoMap" #} 2 | {% for api in apiInfo.apis -%} 3 | export { {{ api.operations.classname }} } from './{{ api.get("classFilename") }}.js'; 4 | {% endfor %} 5 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-nodejs-generator/api.pebble: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from './api/apis.js'; 3 | export * from './model/models.js'; 4 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-nodejs-generator/apiBody/multipart.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="op" type="org.openapitools.codegen.CodegenOperation" #} 2 | const form = new FormData(); 3 | {% for param in op.formParams -%} 4 | {% if param.isFile -%} 5 | form.append("{{param.paramName}}", {{param.paramName}}); // file 6 | {% else -%} 7 | form.append("{{param.paramName}}", String({{param.paramName}})); 8 | {% endif -%} 9 | {% endfor %} 10 | const res = await this.httpClient.{{op.httpMethod|lower}}{% if op.hasFormParams %}Form{% endif %}Multipart( 11 | "{{op.path}}" 12 | {% for param in op.pathParams -%} 13 | .replace("{{ "{" + param.paramName + "}" }}", String({{ param.paramName }})) 14 | {% endfor %}, 15 | form, 16 | ); 17 | const text = await res.text(); 18 | const parsedBody = text ? JSON.parse(text) : null; 19 | return { httpResponse: res, body: parsedBody }; 20 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-nodejs-generator/licenseInfo.pebble: -------------------------------------------------------------------------------- 1 | /** 2 | * {{appName}} 3 | * {{appDescription}} 4 | * 5 | * The version of the OpenAPI document: {{version}} 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | -------------------------------------------------------------------------------- /generator/src/main/resources/line-bot-sdk-nodejs-generator/models.pebble: -------------------------------------------------------------------------------- 1 | {# @pebvariable name="models" type="java.util.ArrayList" #} 2 | {% for model in models -%} 3 | export * from '{{ model.model.classFilename }}.js'; 4 | {%- endfor %} 5 | -------------------------------------------------------------------------------- /lib/channel-access-token/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/channelAccessTokenClient.ts 5 | model/channelAccessTokenKeyIdsResponse.ts 6 | model/errorResponse.ts 7 | model/issueChannelAccessTokenResponse.ts 8 | model/issueShortLivedChannelAccessTokenResponse.ts 9 | model/issueStatelessChannelAccessTokenResponse.ts 10 | model/models.ts 11 | model/verifyChannelAccessTokenResponse.ts 12 | tests/api/ChannelAccessTokenClientTest.spec.ts 13 | -------------------------------------------------------------------------------- /lib/channel-access-token/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/channel-access-token/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/channel-access-token/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { ChannelAccessTokenClient } from "./channelAccessTokenClient.js"; 2 | -------------------------------------------------------------------------------- /lib/channel-access-token/model/channelAccessTokenKeyIdsResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Channel access token key IDs 15 | */ 16 | export type ChannelAccessTokenKeyIdsResponse = { 17 | /** 18 | * Array of channel access token key IDs. 19 | * 20 | * @see kids Documentation 21 | */ 22 | kids: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/channel-access-token/model/errorResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Error response of the Channel access token 15 | */ 16 | export type ErrorResponse = { 17 | /** 18 | * Error summary 19 | */ 20 | error?: string /**/; 21 | /** 22 | * Details of the error. Not returned in certain situations. 23 | */ 24 | error_description?: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/channel-access-token/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./channelAccessTokenKeyIdsResponse.js"; 2 | export * from "./errorResponse.js"; 3 | export * from "./issueChannelAccessTokenResponse.js"; 4 | export * from "./issueShortLivedChannelAccessTokenResponse.js"; 5 | export * from "./issueStatelessChannelAccessTokenResponse.js"; 6 | export * from "./verifyChannelAccessTokenResponse.js"; 7 | -------------------------------------------------------------------------------- /lib/channel-access-token/model/verifyChannelAccessTokenResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Channel Access Token API 3 | * This document describes Channel Access Token API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Verification result 15 | */ 16 | export type VerifyChannelAccessTokenResponse = { 17 | /** 18 | * The channel ID for which the channel access token was issued. 19 | */ 20 | client_id: string /**/; 21 | /** 22 | * Number of seconds before the channel access token expires. 23 | */ 24 | expires_in: number /**/; 25 | /** 26 | * Permissions granted to the channel access token. 27 | */ 28 | scope?: string /**/; 29 | }; 30 | -------------------------------------------------------------------------------- /lib/endpoints.ts: -------------------------------------------------------------------------------- 1 | export const MESSAGING_API_PREFIX = `https://api.line.me/v2/bot`; 2 | export const DATA_API_PREFIX = `https://api-data.line.me/v2/bot`; 3 | export const OAUTH_BASE_PREFIX = `https://api.line.me/v2/oauth`; 4 | export const OAUTH_BASE_PREFIX_V2_1 = `https://api.line.me/oauth2/v2.1`; 5 | -------------------------------------------------------------------------------- /lib/index.ts: -------------------------------------------------------------------------------- 1 | import Client, { OAuth } from "./client.js"; 2 | import middleware from "./middleware.js"; 3 | import validateSignature from "./validate-signature.js"; 4 | 5 | export { Client, middleware, validateSignature, OAuth }; 6 | 7 | // re-export exceptions and types 8 | export * from "./exceptions.js"; 9 | export * from "./types.js"; 10 | 11 | import * as channelAccessToken from "./channel-access-token/api.js"; 12 | export { channelAccessToken }; 13 | import * as insight from "./insight/api.js"; 14 | export { insight }; 15 | import * as liff from "./liff/api.js"; 16 | export { liff }; 17 | import * as manageAudience from "./manage-audience/api.js"; 18 | export { manageAudience }; 19 | import * as messagingApi from "./messaging-api/api.js"; 20 | export { messagingApi }; 21 | // Note: `module` is reserved word in Javascript. 22 | import * as moduleOperation from "./module/api.js"; 23 | export { moduleOperation }; 24 | import * as moduleAttach from "./module-attach/api.js"; 25 | export { moduleAttach }; 26 | import * as shop from "./shop/api.js"; 27 | export { shop }; 28 | import * as webhook from "./webhook/api.js"; 29 | export { webhook }; 30 | -------------------------------------------------------------------------------- /lib/insight/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/insightClient.ts 5 | model/ageTile.ts 6 | model/appTypeTile.ts 7 | model/areaTile.ts 8 | model/errorDetail.ts 9 | model/errorResponse.ts 10 | model/genderTile.ts 11 | model/getFriendsDemographicsResponse.ts 12 | model/getMessageEventResponse.ts 13 | model/getMessageEventResponseClick.ts 14 | model/getMessageEventResponseMessage.ts 15 | model/getMessageEventResponseOverview.ts 16 | model/getNumberOfFollowersResponse.ts 17 | model/getNumberOfMessageDeliveriesResponse.ts 18 | model/getStatisticsPerUnitResponse.ts 19 | model/getStatisticsPerUnitResponseClick.ts 20 | model/getStatisticsPerUnitResponseMessage.ts 21 | model/getStatisticsPerUnitResponseOverview.ts 22 | model/models.ts 23 | model/subscriptionPeriodTile.ts 24 | tests/api/InsightClientTest.spec.ts 25 | -------------------------------------------------------------------------------- /lib/insight/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/insight/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/insight/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { InsightClient } from "./insightClient.js"; 2 | -------------------------------------------------------------------------------- /lib/insight/model/ageTile.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AgeTile = { 14 | /** 15 | * users\' age 16 | */ 17 | age?: AgeTile.AgeEnum /**/; 18 | /** 19 | * Percentage 20 | */ 21 | percentage?: number /**/; 22 | }; 23 | 24 | export namespace AgeTile { 25 | export type AgeEnum = 26 | | "from0to14" 27 | | "from15to19" 28 | | "from20to24" 29 | | "from25to29" 30 | | "from30to34" 31 | | "from35to39" 32 | | "from40to44" 33 | | "from45to49" 34 | | "from50" 35 | | "from50to54" 36 | | "from55to59" 37 | | "from60to64" 38 | | "from65to69" 39 | | "from70" 40 | | "unknown"; 41 | } 42 | -------------------------------------------------------------------------------- /lib/insight/model/appTypeTile.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AppTypeTile = { 14 | /** 15 | * users\' OS 16 | */ 17 | appType?: AppTypeTile.AppTypeEnum /**/; 18 | /** 19 | * Percentage 20 | */ 21 | percentage?: number /**/; 22 | }; 23 | 24 | export namespace AppTypeTile { 25 | export type AppTypeEnum = "ios" | "android" | "others"; 26 | } 27 | -------------------------------------------------------------------------------- /lib/insight/model/areaTile.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AreaTile = { 14 | /** 15 | * users\' country and region 16 | */ 17 | area?: string /**/; 18 | /** 19 | * Percentage 20 | */ 21 | percentage?: number /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/insight/model/errorDetail.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ErrorDetail = { 14 | /** 15 | * Details of the error. Not included in the response under certain situations. 16 | */ 17 | message?: string /**/; 18 | /** 19 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 20 | */ 21 | property?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/insight/model/errorResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ErrorDetail } from "./errorDetail.js"; 14 | 15 | export type ErrorResponse = { 16 | /** 17 | * Message containing information about the error. 18 | * 19 | * @see message Documentation 20 | */ 21 | message: string /**/; 22 | /** 23 | * An array of error details. If the array is empty, this property will not be included in the response. 24 | * 25 | * @see details Documentation 26 | */ 27 | details?: Array /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/insight/model/genderTile.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GenderTile = { 14 | /** 15 | * users\' gender 16 | */ 17 | gender?: GenderTile.GenderEnum /**/; 18 | /** 19 | * Percentage 20 | */ 21 | percentage?: number /**/; 22 | }; 23 | 24 | export namespace GenderTile { 25 | export type GenderEnum = "male" | "female" | "unknown"; 26 | } 27 | -------------------------------------------------------------------------------- /lib/insight/model/getMessageEventResponseClick.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GetMessageEventResponseClick = { 14 | /** 15 | * The URL\'s serial number. 16 | */ 17 | seq?: number /**/; 18 | /** 19 | * URL. 20 | */ 21 | url?: string /**/; 22 | /** 23 | * Number of times the URL was opened. 24 | */ 25 | click?: number | null /**/; 26 | /** 27 | * Number of users that opened the URL. 28 | */ 29 | uniqueClick?: number | null /**/; 30 | /** 31 | * Number of users who opened this url through any link in the message. If a message contains two links to the same URL and a user opens both links, they\'re counted only once. 32 | */ 33 | uniqueClickOfRequest?: number | null /**/; 34 | }; 35 | -------------------------------------------------------------------------------- /lib/insight/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./ageTile.js"; 2 | export * from "./appTypeTile.js"; 3 | export * from "./areaTile.js"; 4 | export * from "./errorDetail.js"; 5 | export * from "./errorResponse.js"; 6 | export * from "./genderTile.js"; 7 | export * from "./getFriendsDemographicsResponse.js"; 8 | export * from "./getMessageEventResponse.js"; 9 | export * from "./getMessageEventResponseClick.js"; 10 | export * from "./getMessageEventResponseMessage.js"; 11 | export * from "./getMessageEventResponseOverview.js"; 12 | export * from "./getNumberOfFollowersResponse.js"; 13 | export * from "./getNumberOfMessageDeliveriesResponse.js"; 14 | export * from "./getStatisticsPerUnitResponse.js"; 15 | export * from "./getStatisticsPerUnitResponseClick.js"; 16 | export * from "./getStatisticsPerUnitResponseMessage.js"; 17 | export * from "./getStatisticsPerUnitResponseOverview.js"; 18 | export * from "./subscriptionPeriodTile.js"; 19 | -------------------------------------------------------------------------------- /lib/insight/model/subscriptionPeriodTile.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API(Insight) 3 | * This document describes LINE Messaging API(Insight). 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type SubscriptionPeriodTile = { 14 | /** 15 | * Subscription period. Possible values: `within7days`, `within90days`, `unknown` etc. 16 | */ 17 | subscriptionPeriod?: SubscriptionPeriodTile.SubscriptionPeriodEnum /**/; 18 | /** 19 | * Percentage. Possible values: [0.0,100.0] e.g. 0, 2.9, 37.6. 20 | */ 21 | percentage?: number /**/; 22 | }; 23 | 24 | export namespace SubscriptionPeriodTile { 25 | export type SubscriptionPeriodEnum = 26 | | "within7days" 27 | | "within30days" 28 | | "within90days" 29 | | "within180days" 30 | | "within365days" 31 | | "over365days" 32 | | "unknown"; 33 | } 34 | -------------------------------------------------------------------------------- /lib/liff/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/liffClient.ts 5 | model/addLiffAppRequest.ts 6 | model/addLiffAppResponse.ts 7 | model/getAllLiffAppsResponse.ts 8 | model/liffApp.ts 9 | model/liffBotPrompt.ts 10 | model/liffFeatures.ts 11 | model/liffScope.ts 12 | model/liffView.ts 13 | model/models.ts 14 | model/updateLiffAppRequest.ts 15 | model/updateLiffView.ts 16 | tests/api/LiffClientTest.spec.ts 17 | -------------------------------------------------------------------------------- /lib/liff/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/liff/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/liff/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { LiffClient } from "./liffClient.js"; 2 | -------------------------------------------------------------------------------- /lib/liff/model/addLiffAppResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AddLiffAppResponse = { 14 | /** 15 | */ 16 | liffId: string /**/; 17 | }; 18 | -------------------------------------------------------------------------------- /lib/liff/model/getAllLiffAppsResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { LiffApp } from "./liffApp.js"; 14 | 15 | export type GetAllLiffAppsResponse = { 16 | /** 17 | */ 18 | apps?: Array /**/; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/liff/model/liffBotPrompt.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Specify the setting for bot link feature with one of the following values: `normal`: Display the option to add the LINE Official Account as a friend in the channel consent screen. `aggressive`: Display a screen with the option to add the LINE Official Account as a friend after the channel consent screen. `none`: Don\'t display the option to add the LINE Official Account as a friend. The default value is none. 15 | */ 16 | 17 | export type LiffBotPrompt = "normal" | "aggressive" | "none"; 18 | -------------------------------------------------------------------------------- /lib/liff/model/liffFeatures.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type LiffFeatures = { 14 | /** 15 | * `true` if the LIFF app supports Bluetooth® Low Energy for LINE Things. `false` otherwise. 16 | */ 17 | ble?: boolean /**/; 18 | /** 19 | * `true` to use the 2D code reader in the LIFF app. false otherwise. The default value is `false`. 20 | */ 21 | qrCode?: boolean /* = false*/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/liff/model/liffScope.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LIFF server API 3 | * LIFF Server API. 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Array of scopes required for some LIFF SDK methods to function. The default value is `[\"profile\", \"chat_message.write\"]`. 15 | */ 16 | 17 | export type LiffScope = "openid" | "email" | "profile" | "chat_message.write"; 18 | -------------------------------------------------------------------------------- /lib/liff/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./addLiffAppRequest.js"; 2 | export * from "./addLiffAppResponse.js"; 3 | export * from "./getAllLiffAppsResponse.js"; 4 | export * from "./liffApp.js"; 5 | export * from "./liffBotPrompt.js"; 6 | export * from "./liffFeatures.js"; 7 | export * from "./liffScope.js"; 8 | export * from "./liffView.js"; 9 | export * from "./updateLiffAppRequest.js"; 10 | export * from "./updateLiffView.js"; 11 | -------------------------------------------------------------------------------- /lib/manage-audience/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/manage-audience/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/manage-audience/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { ManageAudienceClient } from "./manageAudienceClient.js"; 2 | export { ManageAudienceBlobClient } from "./manageAudienceBlobClient.js"; 3 | -------------------------------------------------------------------------------- /lib/manage-audience/model/adaccount.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Adaccount 15 | */ 16 | export type Adaccount = { 17 | /** 18 | * Ad account name. 19 | */ 20 | name?: string /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audience.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Audience 15 | */ 16 | export type Audience = { 17 | /** 18 | * A user ID or IFA. You can specify an empty array. 19 | */ 20 | id?: string /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupCreateRoute.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * How the audience was created. One of: - `OA_MANAGER`: Audience created with [LINE Official Account Manager](https://manager.line.biz/). - `MESSAGING_API`: Audience created with Messaging API. - `POINT_AD`: Audience created with [LINE Points Ads](https://www.linebiz.com/jp/service/line-point-ad/) (Japanese only). - `AD_MANAGER`: Audience created with [LINE Ads](https://admanager.line.biz/). 15 | */ 16 | 17 | export type AudienceGroupCreateRoute = 18 | | "OA_MANAGER" 19 | | "MESSAGING_API" 20 | | "POINT_AD" 21 | | "AD_MANAGER"; 22 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupFailedType.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Failed type 15 | */ 16 | 17 | export type AudienceGroupFailedType = 18 | | "AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT" 19 | | "INTERNAL_ERROR"; 20 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupJobFailedType.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Failed type 15 | */ 16 | 17 | export type AudienceGroupJobFailedType = 18 | | "INTERNAL_ERROR" 19 | | "AUDIENCE_GROUP_AUDIENCE_INSUFFICIENT"; 20 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupJobStatus.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Job status 15 | */ 16 | 17 | export type AudienceGroupJobStatus = 18 | | "QUEUED" 19 | | "WORKING" 20 | | "FINISHED" 21 | | "FAILED"; 22 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupJobType.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Job Type 15 | */ 16 | 17 | export type AudienceGroupJobType = "DIFF_ADD"; 18 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupPermission.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Permission 15 | */ 16 | 17 | export type AudienceGroupPermission = "READ" | "READ_WRITE"; 18 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupStatus.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Status 15 | */ 16 | 17 | export type AudienceGroupStatus = 18 | | "IN_PROGRESS" 19 | | "READY" 20 | | "FAILED" 21 | | "EXPIRED" 22 | | "INACTIVE" 23 | | "ACTIVATING"; 24 | -------------------------------------------------------------------------------- /lib/manage-audience/model/audienceGroupType.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Audience group type 15 | */ 16 | 17 | export type AudienceGroupType = 18 | | "UPLOAD" 19 | | "CLICK" 20 | | "IMP" 21 | | "CHAT_TAG" 22 | | "FRIEND_PATH" 23 | | "RESERVATION" 24 | | "APP_EVENT" 25 | | "VIDEO_VIEW" 26 | | "WEBTRAFFIC" 27 | | "IMAGE_CLICK" 28 | | "RICHMENU_IMP" 29 | | "RICHMENU_CLICK"; 30 | -------------------------------------------------------------------------------- /lib/manage-audience/model/detailedOwner.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Owner of this audience group. 15 | */ 16 | export type DetailedOwner = { 17 | /** 18 | * Service name where the audience group has been created. 19 | */ 20 | serviceType?: string /**/; 21 | /** 22 | * Owner ID in the service. 23 | */ 24 | id?: string /**/; 25 | /** 26 | * Owner account name. 27 | */ 28 | name?: string /**/; 29 | }; 30 | -------------------------------------------------------------------------------- /lib/manage-audience/model/errorDetail.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ErrorDetail = { 14 | /** 15 | * Details of the error. Not included in the response under certain situations. 16 | */ 17 | message?: string /**/; 18 | /** 19 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 20 | */ 21 | property?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/manage-audience/model/errorResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ErrorDetail } from "./errorDetail.js"; 14 | 15 | export type ErrorResponse = { 16 | /** 17 | * Message containing information about the error. 18 | * 19 | * @see message Documentation 20 | */ 21 | message: string /**/; 22 | /** 23 | * An array of error details. If the array is empty, this property will not be included in the response. 24 | * 25 | * @see details Documentation 26 | */ 27 | details?: Array /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/manage-audience/model/updateAudienceGroupDescriptionRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Rename an audience 15 | */ 16 | export type UpdateAudienceGroupDescriptionRequest = { 17 | /** 18 | * The audience\'s name. This is case-insensitive, meaning AUDIENCE and audience are considered identical. Max character limit: 120 19 | * 20 | * @see description Documentation 21 | */ 22 | description?: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/messaging-api/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/messaging-api/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { MessagingApiClient } from "./messagingApiClient.js"; 2 | export { MessagingApiBlobClient } from "./messagingApiBlobClient.js"; 3 | -------------------------------------------------------------------------------- /lib/messaging-api/model/ageDemographic.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AgeDemographic = 14 | | "age_15" 15 | | "age_20" 16 | | "age_25" 17 | | "age_30" 18 | | "age_35" 19 | | "age_40" 20 | | "age_45" 21 | | "age_50" 22 | | "age_55" 23 | | "age_60" 24 | | "age_65" 25 | | "age_70"; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/ageDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AgeDemographic } from "./ageDemographic.js"; 14 | import { DemographicFilter } from "./demographicFilter.js"; 15 | 16 | import { DemographicFilterBase } from "./models.js"; 17 | 18 | export type AgeDemographicFilter = DemographicFilterBase & { 19 | type: "age"; 20 | /** 21 | */ 22 | gte?: AgeDemographic /**/; 23 | /** 24 | */ 25 | lt?: AgeDemographic /**/; 26 | }; 27 | 28 | export namespace AgeDemographicFilter {} 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/allMentionTarget.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MentionTarget } from "./mentionTarget.js"; 14 | 15 | import { MentionTargetBase } from "./models.js"; 16 | 17 | export type AllMentionTarget = MentionTargetBase & { 18 | type: "all"; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/messaging-api/model/altUri.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AltUri = { 14 | /** 15 | */ 16 | desktop?: string /**/; 17 | }; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/appTypeDemographic.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type AppTypeDemographic = "ios" | "android"; 14 | -------------------------------------------------------------------------------- /lib/messaging-api/model/appTypeDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AppTypeDemographic } from "./appTypeDemographic.js"; 14 | import { DemographicFilter } from "./demographicFilter.js"; 15 | 16 | import { DemographicFilterBase } from "./models.js"; 17 | 18 | export type AppTypeDemographicFilter = DemographicFilterBase & { 19 | type: "appType"; 20 | /** 21 | */ 22 | oneOf?: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/areaDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AreaDemographic } from "./areaDemographic.js"; 14 | import { DemographicFilter } from "./demographicFilter.js"; 15 | 16 | import { DemographicFilterBase } from "./models.js"; 17 | 18 | export type AreaDemographicFilter = DemographicFilterBase & { 19 | type: "area"; 20 | /** 21 | */ 22 | oneOf?: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/audienceRecipient.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Recipient } from "./recipient.js"; 14 | 15 | import { RecipientBase } from "./models.js"; 16 | 17 | export type AudienceRecipient = RecipientBase & { 18 | type: "audience"; 19 | /** 20 | */ 21 | audienceGroupId?: number /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/audioMessage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Message } from "./message.js"; 14 | import { QuickReply } from "./quickReply.js"; 15 | import { Sender } from "./sender.js"; 16 | 17 | import { MessageBase } from "./models.js"; 18 | 19 | export type AudioMessage = MessageBase & { 20 | type: "audio"; 21 | /** 22 | * 23 | * @see originalContentUrl Documentation 24 | */ 25 | originalContentUrl: string /**/; 26 | /** 27 | * 28 | * @see duration Documentation 29 | */ 30 | duration: number /**/; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/messaging-api/model/buttonsTemplate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | import { Template } from "./template.js"; 15 | 16 | import { TemplateBase } from "./models.js"; 17 | 18 | export type ButtonsTemplate = TemplateBase & { 19 | type: "buttons"; 20 | /** 21 | */ 22 | thumbnailImageUrl?: string /**/; 23 | /** 24 | */ 25 | imageAspectRatio?: string /**/; 26 | /** 27 | */ 28 | imageSize?: string /**/; 29 | /** 30 | */ 31 | imageBackgroundColor?: string /**/; 32 | /** 33 | */ 34 | title?: string /**/; 35 | /** 36 | */ 37 | text: string /**/; 38 | /** 39 | */ 40 | defaultAction?: Action /**/; 41 | /** 42 | */ 43 | actions: Array /**/; 44 | }; 45 | -------------------------------------------------------------------------------- /lib/messaging-api/model/cameraAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type CameraAction = ActionBase & { 18 | type: "camera"; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/messaging-api/model/cameraRollAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type CameraRollAction = ActionBase & { 18 | type: "cameraRoll"; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/messaging-api/model/carouselColumn.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | /** 16 | * Column object for carousel template. 17 | */ 18 | export type CarouselColumn = { 19 | /** 20 | */ 21 | thumbnailImageUrl?: string /**/; 22 | /** 23 | */ 24 | imageBackgroundColor?: string /**/; 25 | /** 26 | */ 27 | title?: string /**/; 28 | /** 29 | */ 30 | text: string /**/; 31 | /** 32 | */ 33 | defaultAction?: Action /**/; 34 | /** 35 | */ 36 | actions: Array /**/; 37 | }; 38 | -------------------------------------------------------------------------------- /lib/messaging-api/model/carouselTemplate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { CarouselColumn } from "./carouselColumn.js"; 14 | import { Template } from "./template.js"; 15 | 16 | import { TemplateBase } from "./models.js"; 17 | 18 | export type CarouselTemplate = TemplateBase & { 19 | type: "carousel"; 20 | /** 21 | */ 22 | columns: Array /**/; 23 | /** 24 | */ 25 | imageAspectRatio?: string /**/; 26 | /** 27 | */ 28 | imageSize?: string /**/; 29 | }; 30 | -------------------------------------------------------------------------------- /lib/messaging-api/model/chatReference.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Chat reference 15 | */ 16 | export type ChatReference = { 17 | /** 18 | * The target user ID 19 | * 20 | * @see userId Documentation 21 | */ 22 | userId: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/clipboardAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type ClipboardAction = ActionBase & { 18 | type: "clipboard"; 19 | /** 20 | * Text that is copied to the clipboard. Max character limit: 1000 21 | * 22 | * @see clipboardText Documentation 23 | */ 24 | clipboardText: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/clipboardImagemapAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ImagemapAction } from "./imagemapAction.js"; 14 | import { ImagemapArea } from "./imagemapArea.js"; 15 | 16 | import { ImagemapActionBase } from "./models.js"; 17 | 18 | export type ClipboardImagemapAction = ImagemapActionBase & { 19 | type: "clipboard"; 20 | /** 21 | * Text that is copied to the clipboard. Max character limit: 1000 22 | * 23 | * @see clipboardText Documentation 24 | */ 25 | clipboardText: string /**/; 26 | /** 27 | * 28 | * @see label Documentation 29 | */ 30 | label?: string /**/; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/messaging-api/model/confirmTemplate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | import { Template } from "./template.js"; 15 | 16 | import { TemplateBase } from "./models.js"; 17 | 18 | export type ConfirmTemplate = TemplateBase & { 19 | type: "confirm"; 20 | /** 21 | */ 22 | text: string /**/; 23 | /** 24 | */ 25 | actions: Array /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/createRichMenuAliasRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type CreateRichMenuAliasRequest = { 14 | /** 15 | * Rich menu alias ID, which can be any ID, unique for each channel. 16 | * 17 | * @see richMenuAliasId Documentation 18 | */ 19 | richMenuAliasId: string /**/; 20 | /** 21 | * The rich menu ID to be associated with the rich menu alias. 22 | * 23 | * @see richMenuId Documentation 24 | */ 25 | richMenuId: string /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type Emoji = { 14 | /** 15 | */ 16 | index?: number /**/; 17 | /** 18 | */ 19 | productId?: string /**/; 20 | /** 21 | */ 22 | emojiId?: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/emojiSubstitutionObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { SubstitutionObject } from "./substitutionObject.js"; 14 | 15 | /** 16 | * An object representing a emoji substitution. 17 | */ 18 | import { SubstitutionObjectBase } from "./models.js"; 19 | 20 | export type EmojiSubstitutionObject = SubstitutionObjectBase & { 21 | type: "emoji"; 22 | /** 23 | * 24 | * @see productId Documentation 25 | */ 26 | productId: string /**/; 27 | /** 28 | * 29 | * @see emojiId Documentation 30 | */ 31 | emojiId: string /**/; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/messaging-api/model/errorDetail.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ErrorDetail = { 14 | /** 15 | * Details of the error. Not included in the response under certain situations. 16 | */ 17 | message?: string /**/; 18 | /** 19 | * Location of where the error occurred. Returns the JSON field name or query parameter name of the request. Not included in the response under certain situations. 20 | */ 21 | property?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/filter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DemographicFilter } from "./demographicFilter.js"; 14 | 15 | /** 16 | * Filter for narrowcast 17 | */ 18 | export type Filter = { 19 | /** 20 | */ 21 | demographic?: DemographicFilter /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBlockStyle.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type FlexBlockStyle = { 14 | /** 15 | */ 16 | backgroundColor?: string /**/; 17 | /** 18 | */ 19 | separator?: boolean /**/; 20 | /** 21 | */ 22 | separatorColor?: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxBackground.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexBoxLinearGradient } from "./models.js"; 14 | 15 | export type FlexBoxBackground = FlexBoxLinearGradient; // linearGradient 16 | 17 | export type FlexBoxBackgroundBase = { 18 | /** 19 | */ 20 | type: string /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxBorderWidth.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexBoxBorderWidth = 18 | | "none" 19 | | "light" 20 | | "normal" 21 | | "medium" 22 | | "semi-bold" 23 | | "bold"; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxCornerRadius.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexBoxCornerRadius = 18 | | "none" 19 | | "xs" 20 | | "sm" 21 | | "md" 22 | | "lg" 23 | | "xl" 24 | | "xxl"; 25 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxLinearGradient.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexBoxBackground } from "./flexBoxBackground.js"; 14 | 15 | import { FlexBoxBackgroundBase } from "./models.js"; 16 | 17 | export type FlexBoxLinearGradient = FlexBoxBackgroundBase & { 18 | type: "linearGradient"; 19 | /** 20 | */ 21 | angle?: string /**/; 22 | /** 23 | */ 24 | startColor?: string /**/; 25 | /** 26 | */ 27 | endColor?: string /**/; 28 | /** 29 | */ 30 | centerColor?: string /**/; 31 | /** 32 | */ 33 | centerPosition?: string /**/; 34 | }; 35 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxPadding.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Padding can be specified in pixels, percentage (to the parent box width) or with a keyword. FlexBoxPadding just provides only keywords. 15 | */ 16 | 17 | export type FlexBoxPadding = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBoxSpacing.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexBoxSpacing = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexBubbleStyles.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexBlockStyle } from "./flexBlockStyle.js"; 14 | 15 | export type FlexBubbleStyles = { 16 | /** 17 | */ 18 | header?: FlexBlockStyle /**/; 19 | /** 20 | */ 21 | hero?: FlexBlockStyle /**/; 22 | /** 23 | */ 24 | body?: FlexBlockStyle /**/; 25 | /** 26 | */ 27 | footer?: FlexBlockStyle /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexCarousel.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexBubble } from "./flexBubble.js"; 14 | import { FlexContainer } from "./flexContainer.js"; 15 | 16 | import { FlexContainerBase } from "./models.js"; 17 | 18 | export type FlexCarousel = FlexContainerBase & { 19 | type: "carousel"; 20 | /** 21 | */ 22 | contents: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexContainer.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexBubble } from "./models.js"; 14 | import { FlexCarousel } from "./models.js"; 15 | 16 | export type FlexContainer = 17 | | FlexBubble // bubble 18 | | FlexCarousel; // carousel 19 | 20 | export type FlexContainerBase = { 21 | /** 22 | */ 23 | type: string /**/; 24 | }; 25 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexFiller.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexComponent } from "./flexComponent.js"; 14 | 15 | import { FlexComponentBase } from "./models.js"; 16 | 17 | export type FlexFiller = FlexComponentBase & { 18 | type: "filler"; 19 | /** 20 | */ 21 | flex?: number /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexIconSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexIconSize = 18 | | "xxs" 19 | | "xs" 20 | | "sm" 21 | | "md" 22 | | "lg" 23 | | "xl" 24 | | "xxl" 25 | | "3xl" 26 | | "4xl" 27 | | "5xl"; 28 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexImageSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexImageSize = 18 | | "xxs" 19 | | "xs" 20 | | "sm" 21 | | "md" 22 | | "lg" 23 | | "xl" 24 | | "xxl" 25 | | "3xl" 26 | | "4xl" 27 | | "5xl" 28 | | "full"; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexMargin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexMargin = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexMessage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexContainer } from "./flexContainer.js"; 14 | import { Message } from "./message.js"; 15 | import { QuickReply } from "./quickReply.js"; 16 | import { Sender } from "./sender.js"; 17 | 18 | import { MessageBase } from "./models.js"; 19 | 20 | export type FlexMessage = MessageBase & { 21 | type: "flex"; 22 | /** 23 | * 24 | * @see altText Documentation 25 | */ 26 | altText: string /**/; 27 | /** 28 | * 29 | * @see contents Documentation 30 | */ 31 | contents: FlexContainer /**/; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexOffset.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexOffset = "none" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexSeparator.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { FlexComponent } from "./flexComponent.js"; 14 | 15 | import { FlexComponentBase } from "./models.js"; 16 | 17 | export type FlexSeparator = FlexComponentBase & { 18 | type: "separator"; 19 | /** 20 | */ 21 | margin?: string /**/; 22 | /** 23 | */ 24 | color?: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexSpanSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexSpanSize = 18 | | "xxs" 19 | | "xs" 20 | | "sm" 21 | | "md" 22 | | "lg" 23 | | "xl" 24 | | "xxl" 25 | | "3xl" 26 | | "4xl" 27 | | "5xl"; 28 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexTextFontSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * 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. 15 | */ 16 | 17 | export type FlexTextFontSize = 18 | | "xxs" 19 | | "xs" 20 | | "sm" 21 | | "md" 22 | | "lg" 23 | | "xl" 24 | | "xxl" 25 | | "3xl" 26 | | "4xl" 27 | | "5xl"; 28 | -------------------------------------------------------------------------------- /lib/messaging-api/model/flexVideo.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | import { FlexComponent } from "./flexComponent.js"; 15 | 16 | import { FlexComponentBase } from "./models.js"; 17 | 18 | export type FlexVideo = FlexComponentBase & { 19 | type: "video"; 20 | /** 21 | */ 22 | url: string /**/; 23 | /** 24 | */ 25 | previewUrl: string /**/; 26 | /** 27 | */ 28 | altContent: FlexComponent /**/; 29 | /** 30 | */ 31 | aspectRatio?: string /**/; 32 | /** 33 | */ 34 | action?: Action /**/; 35 | }; 36 | -------------------------------------------------------------------------------- /lib/messaging-api/model/genderDemographic.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GenderDemographic = "male" | "female"; 14 | -------------------------------------------------------------------------------- /lib/messaging-api/model/genderDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DemographicFilter } from "./demographicFilter.js"; 14 | import { GenderDemographic } from "./genderDemographic.js"; 15 | 16 | import { DemographicFilterBase } from "./models.js"; 17 | 18 | export type GenderDemographicFilter = DemographicFilterBase & { 19 | type: "gender"; 20 | /** 21 | */ 22 | oneOf?: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/getAggregationUnitUsageResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GetAggregationUnitUsageResponse = { 14 | /** 15 | * Number of aggregation units used this month. 16 | * 17 | * @see numOfCustomAggregationUnits Documentation 18 | */ 19 | numOfCustomAggregationUnits: number /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/getMembershipSubscriptionResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Subscription } from "./subscription.js"; 14 | 15 | /** 16 | * A user\'s membership subscription status 17 | */ 18 | export type GetMembershipSubscriptionResponse = { 19 | /** 20 | * List of subscription information 21 | * 22 | * @see subscriptions Documentation 23 | */ 24 | subscriptions: Array /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/getMessageContentTranscodingResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Transcoding response 15 | */ 16 | export type GetMessageContentTranscodingResponse = { 17 | /** 18 | * The preparation status. One of: `processing`: Preparing to get content. `succeeded`: Ready to get the content. You can get the content sent by users. `failed`: Failed to prepare to get the content. 19 | * 20 | * @see status Documentation 21 | */ 22 | status: GetMessageContentTranscodingResponse.StatusEnum /**/; 23 | }; 24 | 25 | export namespace GetMessageContentTranscodingResponse { 26 | export type StatusEnum = "processing" | "succeeded" | "failed"; 27 | } 28 | -------------------------------------------------------------------------------- /lib/messaging-api/model/getWebhookEndpointResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GetWebhookEndpointResponse = { 14 | /** 15 | * Webhook URL 16 | * 17 | * @see endpoint Documentation 18 | */ 19 | endpoint: string /**/; 20 | /** 21 | * Webhook usage status. Send a webhook event from the LINE Platform to the webhook URL only if enabled. `true`: Webhook usage is enabled. `false`: Webhook usage is disabled. 22 | * 23 | * @see active Documentation 24 | */ 25 | active: boolean /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/groupMemberCountResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GroupMemberCountResponse = { 14 | /** 15 | * The count of members in the group chat. The number returned excludes the LINE Official Account. 16 | * 17 | * @see count Documentation 18 | */ 19 | count: number /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/groupSummaryResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type GroupSummaryResponse = { 14 | /** 15 | * Group ID 16 | * 17 | * @see groupId Documentation 18 | */ 19 | groupId: string /**/; 20 | /** 21 | * Group name 22 | * 23 | * @see groupName Documentation 24 | */ 25 | groupName: string /**/; 26 | /** 27 | * Group icon URL. Not included in the response if the user doesn\'t set a group profile icon. 28 | * 29 | * @see pictureUrl Documentation 30 | */ 31 | pictureUrl?: string /**/; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imageCarouselColumn.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | export type ImageCarouselColumn = { 16 | /** 17 | */ 18 | imageUrl: string /**/; 19 | /** 20 | */ 21 | action: Action /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imageCarouselTemplate.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ImageCarouselColumn } from "./imageCarouselColumn.js"; 14 | import { Template } from "./template.js"; 15 | 16 | import { TemplateBase } from "./models.js"; 17 | 18 | export type ImageCarouselTemplate = TemplateBase & { 19 | type: "image_carousel"; 20 | /** 21 | */ 22 | columns: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imageMessage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Message } from "./message.js"; 14 | import { QuickReply } from "./quickReply.js"; 15 | import { Sender } from "./sender.js"; 16 | 17 | import { MessageBase } from "./models.js"; 18 | 19 | export type ImageMessage = MessageBase & { 20 | type: "image"; 21 | /** 22 | * 23 | * @see originalContentUrl Documentation 24 | */ 25 | originalContentUrl: string /**/; 26 | /** 27 | * 28 | * @see previewImageUrl Documentation 29 | */ 30 | previewImageUrl: string /**/; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imagemapArea.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ImagemapArea = { 14 | /** 15 | */ 16 | x: number /**/; 17 | /** 18 | */ 19 | y: number /**/; 20 | /** 21 | */ 22 | width: number /**/; 23 | /** 24 | */ 25 | height: number /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imagemapBaseSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ImagemapBaseSize = { 14 | /** 15 | */ 16 | height: number /**/; 17 | /** 18 | */ 19 | width: number /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imagemapExternalLink.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ImagemapExternalLink = { 14 | /** 15 | */ 16 | linkUri?: string /**/; 17 | /** 18 | */ 19 | label?: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/imagemapVideo.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ImagemapArea } from "./imagemapArea.js"; 14 | import { ImagemapExternalLink } from "./imagemapExternalLink.js"; 15 | 16 | export type ImagemapVideo = { 17 | /** 18 | */ 19 | originalContentUrl?: string /**/; 20 | /** 21 | */ 22 | previewImageUrl?: string /**/; 23 | /** 24 | */ 25 | area?: ImagemapArea /**/; 26 | /** 27 | */ 28 | externalLink?: ImagemapExternalLink /**/; 29 | }; 30 | -------------------------------------------------------------------------------- /lib/messaging-api/model/issueLinkTokenResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type IssueLinkTokenResponse = { 14 | /** 15 | * Link token. Link tokens are valid for 10 minutes and can only be used once. 16 | * 17 | * @see linkToken Documentation 18 | */ 19 | linkToken: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/locationAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type LocationAction = ActionBase & { 18 | type: "location"; 19 | }; 20 | -------------------------------------------------------------------------------- /lib/messaging-api/model/markMessagesAsReadRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ChatReference } from "./chatReference.js"; 14 | 15 | export type MarkMessagesAsReadRequest = { 16 | /** 17 | * 18 | * @see chat Documentation 19 | */ 20 | chat: ChatReference /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/messaging-api/model/membersIdsResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type MembersIdsResponse = { 14 | /** 15 | * List of user IDs of members in the group chat. Only users of LINE for iOS and LINE for Android are included in `memberIds`. 16 | */ 17 | memberIds: Array /**/; 18 | /** 19 | * A continuation token to get the next array of user IDs of the members in the group chat. Returned only when there are remaining user IDs that were not returned in `memberIds` in the original request. 20 | */ 21 | next?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/membershipListResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Membership } from "./membership.js"; 14 | 15 | /** 16 | * List of memberships 17 | */ 18 | export type MembershipListResponse = { 19 | /** 20 | * List of membership information 21 | */ 22 | memberships: Array /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/messaging-api/model/mentionSubstitutionObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MentionTarget } from "./mentionTarget.js"; 14 | import { SubstitutionObject } from "./substitutionObject.js"; 15 | 16 | /** 17 | * An object representing a mention substitution. 18 | */ 19 | import { SubstitutionObjectBase } from "./models.js"; 20 | 21 | export type MentionSubstitutionObject = SubstitutionObjectBase & { 22 | type: "mention"; 23 | /** 24 | * 25 | * @see mentionee Documentation 26 | */ 27 | mentionee: MentionTarget /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/mentionTarget.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AllMentionTarget } from "./models.js"; 14 | import { UserMentionTarget } from "./models.js"; 15 | 16 | export type MentionTarget = 17 | | AllMentionTarget // all 18 | | UserMentionTarget; // user 19 | 20 | export type MentionTargetBase = { 21 | /** 22 | * Target to be mentioned 23 | */ 24 | type: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/messageAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type MessageAction = ActionBase & { 18 | type: "message"; 19 | /** 20 | */ 21 | text?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/messageImagemapAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ImagemapAction } from "./imagemapAction.js"; 14 | import { ImagemapArea } from "./imagemapArea.js"; 15 | 16 | import { ImagemapActionBase } from "./models.js"; 17 | 18 | export type MessageImagemapAction = ImagemapActionBase & { 19 | type: "message"; 20 | /** 21 | */ 22 | text: string /**/; 23 | /** 24 | */ 25 | label?: string /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/messageQuotaResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { QuotaType } from "./quotaType.js"; 14 | 15 | export type MessageQuotaResponse = { 16 | /** 17 | * 18 | * @see type Documentation 19 | */ 20 | type: QuotaType /**/; 21 | /** 22 | * The target limit for sending messages in the current month. This property is returned when the `type` property has a value of `limited`. 23 | * 24 | * @see value Documentation 25 | */ 26 | value?: number /**/; 27 | }; 28 | 29 | export namespace MessageQuotaResponse {} 30 | -------------------------------------------------------------------------------- /lib/messaging-api/model/operatorDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DemographicFilter } from "./demographicFilter.js"; 14 | 15 | import { DemographicFilterBase } from "./models.js"; 16 | 17 | export type OperatorDemographicFilter = DemographicFilterBase & { 18 | type: "operator"; 19 | /** 20 | */ 21 | and?: Array /**/; 22 | /** 23 | */ 24 | or?: Array /**/; 25 | /** 26 | */ 27 | not?: DemographicFilter /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/operatorRecipient.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Recipient } from "./recipient.js"; 14 | 15 | import { RecipientBase } from "./models.js"; 16 | 17 | export type OperatorRecipient = RecipientBase & { 18 | type: "operator"; 19 | /** 20 | * Create a new recipient object by taking the logical conjunction (AND) of the specified array of recipient objects. 21 | */ 22 | and?: Array /**/; 23 | /** 24 | * Create a new recipient object by taking the logical disjunction (OR) of the specified array of recipient objects. 25 | */ 26 | or?: Array /**/; 27 | /** 28 | */ 29 | not?: Recipient /**/; 30 | }; 31 | -------------------------------------------------------------------------------- /lib/messaging-api/model/postbackAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type PostbackAction = ActionBase & { 18 | type: "postback"; 19 | /** 20 | */ 21 | data?: string /**/; 22 | /** 23 | */ 24 | displayText?: string /**/; 25 | /** 26 | */ 27 | text?: string /**/; 28 | /** 29 | */ 30 | inputOption?: PostbackAction.InputOptionEnum /**/; 31 | /** 32 | */ 33 | fillInText?: string /**/; 34 | }; 35 | 36 | export namespace PostbackAction { 37 | export type InputOptionEnum = 38 | | "closeRichMenu" 39 | | "openRichMenu" 40 | | "openKeyboard" 41 | | "openVoice"; 42 | } 43 | -------------------------------------------------------------------------------- /lib/messaging-api/model/pushMessageResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { SentMessage } from "./sentMessage.js"; 14 | 15 | export type PushMessageResponse = { 16 | /** 17 | * Array of sent messages. 18 | * 19 | * @see sentMessages Documentation 20 | */ 21 | sentMessages: Array /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/quickReply.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { QuickReplyItem } from "./quickReplyItem.js"; 14 | 15 | /** 16 | * Quick reply 17 | */ 18 | export type QuickReply = { 19 | /** 20 | * Quick reply button objects. 21 | * 22 | * @see items Documentation 23 | */ 24 | items?: Array /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/quickReplyItem.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | export type QuickReplyItem = { 16 | /** 17 | * URL of the icon that is displayed at the beginning of the button 18 | * 19 | * @see imageUrl Documentation 20 | */ 21 | imageUrl?: string /**/; 22 | /** 23 | * 24 | * @see action Documentation 25 | */ 26 | action?: Action /**/; 27 | /** 28 | * `action` 29 | * 30 | * @see type Documentation 31 | */ 32 | type?: string /* = 'action'*/; 33 | }; 34 | -------------------------------------------------------------------------------- /lib/messaging-api/model/quotaConsumptionResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type QuotaConsumptionResponse = { 14 | /** 15 | * The number of sent messages in the current month 16 | * 17 | * @see totalUsage Documentation 18 | */ 19 | totalUsage: number /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/quotaType.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * One of the following values to indicate whether a target limit is set or not. 15 | */ 16 | 17 | export type QuotaType = "none" | "limited"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/recipient.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AudienceRecipient } from "./models.js"; 14 | import { OperatorRecipient } from "./models.js"; 15 | import { RedeliveryRecipient } from "./models.js"; 16 | 17 | export type Recipient = 18 | | AudienceRecipient // audience 19 | | OperatorRecipient // operator 20 | | RedeliveryRecipient; // redelivery 21 | 22 | /** 23 | * Recipient 24 | */ 25 | export type RecipientBase = { 26 | /** 27 | * Type of recipient 28 | */ 29 | type?: string /**/; 30 | }; 31 | -------------------------------------------------------------------------------- /lib/messaging-api/model/redeliveryRecipient.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Recipient } from "./recipient.js"; 14 | 15 | import { RecipientBase } from "./models.js"; 16 | 17 | export type RedeliveryRecipient = RecipientBase & { 18 | type: "redelivery"; 19 | /** 20 | */ 21 | requestId?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/replyMessageResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { SentMessage } from "./sentMessage.js"; 14 | 15 | export type ReplyMessageResponse = { 16 | /** 17 | * Array of sent messages. 18 | * 19 | * @see sentMessages Documentation 20 | */ 21 | sentMessages: Array /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuAliasListResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuAliasResponse } from "./richMenuAliasResponse.js"; 14 | 15 | export type RichMenuAliasListResponse = { 16 | /** 17 | * Rich menu aliases. 18 | * 19 | * @see aliases Documentation 20 | */ 21 | aliases: Array /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuAliasResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type RichMenuAliasResponse = { 14 | /** 15 | * Rich menu alias ID. 16 | */ 17 | richMenuAliasId: string /**/; 18 | /** 19 | * The rich menu ID associated with the rich menu alias. 20 | */ 21 | richMenuId: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuArea.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | import { RichMenuBounds } from "./richMenuBounds.js"; 15 | 16 | /** 17 | * Rich menu area 18 | */ 19 | export type RichMenuArea = { 20 | /** 21 | */ 22 | bounds?: RichMenuBounds /**/; 23 | /** 24 | */ 25 | action?: Action /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBatchLinkOperation.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuBatchOperation } from "./richMenuBatchOperation.js"; 14 | 15 | /** 16 | * Replace the rich menu with the rich menu specified in the `to` property for all users linked to the rich menu specified in the `from` property. 17 | */ 18 | import { RichMenuBatchOperationBase } from "./models.js"; 19 | 20 | export type RichMenuBatchLinkOperation = RichMenuBatchOperationBase & { 21 | type: "link"; 22 | /** 23 | */ 24 | from: string /**/; 25 | /** 26 | */ 27 | to: string /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBatchProgressPhase.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * The current status. One of: `ongoing`: Rich menu batch control is in progress. `succeeded`: Rich menu batch control is complete. `failed`: Rich menu batch control failed. This means that the rich menu for one or more users couldn\'t be controlled. There may also be users whose operations have been successfully completed. 15 | */ 16 | 17 | export type RichMenuBatchProgressPhase = "ongoing" | "succeeded" | "failed"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBatchRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuBatchOperation } from "./richMenuBatchOperation.js"; 14 | 15 | export type RichMenuBatchRequest = { 16 | /** 17 | * Array of Rich menu operation object... 18 | */ 19 | operations: Array /**/; 20 | /** 21 | * Key for retry. Key value is a string matching the regular expression pattern 22 | */ 23 | resumeRequestKey?: string /**/; 24 | }; 25 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBatchUnlinkAllOperation.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuBatchOperation } from "./richMenuBatchOperation.js"; 14 | 15 | /** 16 | * Unlink the rich menu from all users linked to the rich menu. 17 | */ 18 | import { RichMenuBatchOperationBase } from "./models.js"; 19 | 20 | export type RichMenuBatchUnlinkAllOperation = RichMenuBatchOperationBase & { 21 | type: "unlinkAll"; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBatchUnlinkOperation.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuBatchOperation } from "./richMenuBatchOperation.js"; 14 | 15 | /** 16 | * Unlink the rich menu for all users linked to the rich menu specified in the `from` property. 17 | */ 18 | import { RichMenuBatchOperationBase } from "./models.js"; 19 | 20 | export type RichMenuBatchUnlinkOperation = RichMenuBatchOperationBase & { 21 | type: "unlink"; 22 | /** 23 | */ 24 | from: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBulkLinkRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type RichMenuBulkLinkRequest = { 14 | /** 15 | * ID of a rich menu 16 | * 17 | * @see richMenuId Documentation 18 | */ 19 | richMenuId: string /**/; 20 | /** 21 | * Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. 22 | * 23 | * @see userIds Documentation 24 | */ 25 | userIds: Array /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuBulkUnlinkRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type RichMenuBulkUnlinkRequest = { 14 | /** 15 | * Array of user IDs. Found in the `source` object of webhook event objects. Do not use the LINE ID used in LINE. 16 | * 17 | * @see userIds Documentation 18 | */ 19 | userIds: Array /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuIdResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type RichMenuIdResponse = { 14 | /** 15 | * Rich menu ID 16 | */ 17 | richMenuId: string /**/; 18 | }; 19 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuListResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuResponse } from "./richMenuResponse.js"; 14 | 15 | export type RichMenuListResponse = { 16 | /** 17 | * Rich menus 18 | * 19 | * @see richmenus Documentation 20 | */ 21 | richmenus: Array /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { RichMenuArea } from "./richMenuArea.js"; 14 | import { RichMenuSize } from "./richMenuSize.js"; 15 | 16 | export type RichMenuRequest = { 17 | /** 18 | */ 19 | size?: RichMenuSize /**/; 20 | /** 21 | * `true` to display the rich menu by default. Otherwise, `false`. 22 | */ 23 | selected?: boolean /**/; 24 | /** 25 | * Name of the rich menu. This value can be used to help manage your rich menus and is not displayed to users. 26 | */ 27 | name?: string /**/; 28 | /** 29 | * Text displayed in the chat bar 30 | */ 31 | chatBarText?: string /**/; 32 | /** 33 | * Array of area objects which define the coordinates and size of tappable areas 34 | */ 35 | areas?: Array /**/; 36 | }; 37 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Rich menu size 15 | */ 16 | export type RichMenuSize = { 17 | /** 18 | * width 19 | */ 20 | width?: number /**/; 21 | /** 22 | * height 23 | */ 24 | height?: number /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/richMenuSwitchAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | 15 | import { ActionBase } from "./models.js"; 16 | 17 | export type RichMenuSwitchAction = ActionBase & { 18 | type: "richmenuswitch"; 19 | /** 20 | */ 21 | data?: string /**/; 22 | /** 23 | */ 24 | richMenuAliasId?: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/roomMemberCountResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type RoomMemberCountResponse = { 14 | /** 15 | * The count of members in the multi-person chat. The number returned excludes the LINE Official Account. 16 | * 17 | * @see count Documentation 18 | */ 19 | count: number /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/sender.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Change icon and display name 15 | */ 16 | export type Sender = { 17 | /** 18 | * Display name. Certain words such as `LINE` may not be used. 19 | */ 20 | name?: string /**/; 21 | /** 22 | * URL of the image to display as an icon when sending a message 23 | */ 24 | iconUrl?: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/messaging-api/model/sentMessage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type SentMessage = { 14 | /** 15 | * ID of the sent message. 16 | */ 17 | id: string /**/; 18 | /** 19 | * Quote token of the message. Only included when a message object that can be specified as a quote target was sent as a push or reply message. 20 | */ 21 | quoteToken?: string /**/; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/messaging-api/model/setWebhookEndpointRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type SetWebhookEndpointRequest = { 14 | /** 15 | * A valid webhook URL. 16 | * 17 | * @see endpoint Documentation 18 | */ 19 | endpoint: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/showLoadingAnimationRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ShowLoadingAnimationRequest = { 14 | /** 15 | * User ID of the target user for whom the loading animation is to be displayed. 16 | * 17 | * @see chatId Documentation 18 | */ 19 | chatId: string /**/; 20 | /** 21 | * The number of seconds to display the loading indicator. It must be a multiple of 5. The maximum value is 60 seconds. 22 | * 23 | * @see loadingSeconds Documentation 24 | */ 25 | loadingSeconds?: number /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/subscription.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { SubscribedMembershipPlan } from "./subscribedMembershipPlan.js"; 14 | import { SubscribedMembershipUser } from "./subscribedMembershipUser.js"; 15 | 16 | /** 17 | * An array of memberships. 18 | */ 19 | export type Subscription = { 20 | /** 21 | */ 22 | membership: SubscribedMembershipPlan /**/; 23 | /** 24 | */ 25 | user: SubscribedMembershipUser /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/subscriptionPeriodDemographic.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type SubscriptionPeriodDemographic = 14 | | "day_7" 15 | | "day_30" 16 | | "day_90" 17 | | "day_180" 18 | | "day_365"; 19 | -------------------------------------------------------------------------------- /lib/messaging-api/model/subscriptionPeriodDemographicFilter.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DemographicFilter } from "./demographicFilter.js"; 14 | import { SubscriptionPeriodDemographic } from "./subscriptionPeriodDemographic.js"; 15 | 16 | import { DemographicFilterBase } from "./models.js"; 17 | 18 | export type SubscriptionPeriodDemographicFilter = DemographicFilterBase & { 19 | type: "subscriptionPeriod"; 20 | /** 21 | */ 22 | gte?: SubscriptionPeriodDemographic /**/; 23 | /** 24 | */ 25 | lt?: SubscriptionPeriodDemographic /**/; 26 | }; 27 | 28 | export namespace SubscriptionPeriodDemographicFilter {} 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/substitutionObject.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { EmojiSubstitutionObject } from "./models.js"; 14 | import { MentionSubstitutionObject } from "./models.js"; 15 | 16 | export type SubstitutionObject = 17 | | EmojiSubstitutionObject // emoji 18 | | MentionSubstitutionObject; // mention 19 | 20 | /** 21 | * An object that defines the replacement value for a placeholder in the text. 22 | */ 23 | export type SubstitutionObjectBase = { 24 | /** 25 | * Type of substitution object 26 | */ 27 | type: string /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/template.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ButtonsTemplate } from "./models.js"; 14 | import { CarouselTemplate } from "./models.js"; 15 | import { ConfirmTemplate } from "./models.js"; 16 | import { ImageCarouselTemplate } from "./models.js"; 17 | 18 | export type Template = 19 | | ButtonsTemplate // buttons 20 | | CarouselTemplate // carousel 21 | | ConfirmTemplate // confirm 22 | | ImageCarouselTemplate; // image_carousel 23 | 24 | export type TemplateBase = { 25 | /** 26 | */ 27 | type: string /**/; 28 | }; 29 | -------------------------------------------------------------------------------- /lib/messaging-api/model/templateImageAspectRatio.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Aspect ratio of the image. This is only for the `imageAspectRatio` in ButtonsTemplate. Specify one of the following values: `rectangle`: 1.51:1 `square`: 1:1 15 | */ 16 | 17 | export type TemplateImageAspectRatio = "rectangle" | "square"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/templateImageSize.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Size of the image. This is only for the `imageSize` in ButtonsTemplate. Specify one of the following values: `cover`: The image fills the entire image area. Parts of the image that do not fit in the area are not displayed. `contain`: The entire image is displayed in the image area. A background is displayed in the unused areas to the left and right of vertical images and in the areas above and below horizontal images. 15 | */ 16 | 17 | export type TemplateImageSize = "cover" | "contain"; 18 | -------------------------------------------------------------------------------- /lib/messaging-api/model/templateMessage.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Message } from "./message.js"; 14 | import { QuickReply } from "./quickReply.js"; 15 | import { Sender } from "./sender.js"; 16 | import { Template } from "./template.js"; 17 | 18 | import { MessageBase } from "./models.js"; 19 | 20 | export type TemplateMessage = MessageBase & { 21 | type: "template"; 22 | /** 23 | * 24 | * @see altText Documentation 25 | */ 26 | altText: string /**/; 27 | /** 28 | * 29 | * @see template Documentation 30 | */ 31 | template: Template /**/; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/messaging-api/model/testWebhookEndpointRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type TestWebhookEndpointRequest = { 14 | /** 15 | * A webhook URL to be validated. 16 | * 17 | * @see endpoint Documentation 18 | */ 19 | endpoint?: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/uRIAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Action } from "./action.js"; 14 | import { AltUri } from "./altUri.js"; 15 | 16 | import { ActionBase } from "./models.js"; 17 | 18 | export type URIAction = ActionBase & { 19 | type: "uri"; 20 | /** 21 | */ 22 | uri?: string /**/; 23 | /** 24 | */ 25 | altUri?: AltUri /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/uRIImagemapAction.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ImagemapAction } from "./imagemapAction.js"; 14 | import { ImagemapArea } from "./imagemapArea.js"; 15 | 16 | import { ImagemapActionBase } from "./models.js"; 17 | 18 | export type URIImagemapAction = ImagemapActionBase & { 19 | type: "uri"; 20 | /** 21 | */ 22 | linkUri: string /**/; 23 | /** 24 | */ 25 | label?: string /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/messaging-api/model/updateRichMenuAliasRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type UpdateRichMenuAliasRequest = { 14 | /** 15 | * The rich menu ID to be associated with the rich menu alias. 16 | * 17 | * @see richMenuId Documentation 18 | */ 19 | richMenuId: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/messaging-api/model/userMentionTarget.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MentionTarget } from "./mentionTarget.js"; 14 | 15 | import { MentionTargetBase } from "./models.js"; 16 | 17 | export type UserMentionTarget = MentionTargetBase & { 18 | type: "user"; 19 | /** 20 | * 21 | * @see userId Documentation 22 | */ 23 | userId: string /**/; 24 | }; 25 | -------------------------------------------------------------------------------- /lib/messaging-api/model/validateMessageRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Message } from "./message.js"; 14 | 15 | export type ValidateMessageRequest = { 16 | /** 17 | * Array of message objects to validate 18 | */ 19 | messages: Array /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/module-attach/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/lineModuleAttachClient.ts 5 | model/attachModuleResponse.ts 6 | model/models.ts 7 | tests/api/LineModuleAttachClientTest.spec.ts 8 | -------------------------------------------------------------------------------- /lib/module-attach/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/module-attach/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/module-attach/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { LineModuleAttachClient } from "./lineModuleAttachClient.js"; 2 | -------------------------------------------------------------------------------- /lib/module-attach/model/attachModuleResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Attach by operation of the module channel provider 15 | */ 16 | export type AttachModuleResponse = { 17 | /** 18 | * User ID of the bot on the LINE Official Account. 19 | */ 20 | bot_id: string /**/; 21 | /** 22 | * Permissions (scope) granted by the LINE Official Account admin. 23 | */ 24 | scopes: Array /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/module-attach/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./attachModuleResponse.js"; 2 | -------------------------------------------------------------------------------- /lib/module/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/lineModuleClient.ts 5 | model/acquireChatControlRequest.ts 6 | model/detachModuleRequest.ts 7 | model/getModulesResponse.ts 8 | model/models.ts 9 | model/moduleBot.ts 10 | tests/api/LineModuleClientTest.spec.ts 11 | -------------------------------------------------------------------------------- /lib/module/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/module/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/module/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { LineModuleClient } from "./lineModuleClient.js"; 2 | -------------------------------------------------------------------------------- /lib/module/model/detachModuleRequest.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * LINE Messaging API 3 | * This document describes LINE Messaging API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Unlink (detach) the module channel by the operation of the module channel administrator 15 | */ 16 | export type DetachModuleRequest = { 17 | /** 18 | * User ID of the LINE Official Account bot attached to the module channel. 19 | * 20 | * @see botId Documentation 21 | */ 22 | botId?: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/module/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./acquireChatControlRequest.js"; 2 | export * from "./detachModuleRequest.js"; 3 | export * from "./getModulesResponse.js"; 4 | export * from "./moduleBot.js"; 5 | -------------------------------------------------------------------------------- /lib/shop/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .openapi-generator-ignore 2 | api.ts 3 | api/apis.ts 4 | api/shopClient.ts 5 | model/errorResponse.ts 6 | model/missionStickerRequest.ts 7 | model/models.ts 8 | tests/api/ShopClientTest.spec.ts 9 | -------------------------------------------------------------------------------- /lib/shop/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/shop/api.ts: -------------------------------------------------------------------------------- 1 | // This is the entrypoint for the package 2 | export * from "./api/apis.js"; 3 | export * from "./model/models.js"; 4 | -------------------------------------------------------------------------------- /lib/shop/api/apis.ts: -------------------------------------------------------------------------------- 1 | export { ShopClient } from "./shopClient.js"; 2 | -------------------------------------------------------------------------------- /lib/shop/model/errorResponse.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Mission Stickers API 3 | * This document describes LINE Mission Stickers API. 4 | * 5 | * The version of the OpenAPI document: 0.0.1 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ErrorResponse = { 14 | /** 15 | * Message containing information about the error. 16 | * 17 | * @see message Documentation 18 | */ 19 | message: string /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/shop/model/models.ts: -------------------------------------------------------------------------------- 1 | export * from "./errorResponse.js"; 2 | export * from "./missionStickerRequest.js"; 3 | -------------------------------------------------------------------------------- /lib/utils.ts: -------------------------------------------------------------------------------- 1 | import { Buffer } from "node:buffer"; 2 | import { JSONParseError } from "./exceptions.js"; 3 | 4 | export function toArray(maybeArr: T | T[]): T[] { 5 | return Array.isArray(maybeArr) ? maybeArr : [maybeArr]; 6 | } 7 | 8 | export function ensureJSON(raw: T): T { 9 | if (typeof raw === "object") { 10 | return raw; 11 | } else { 12 | throw new JSONParseError("Failed to parse response body as JSON", { raw }); 13 | } 14 | } 15 | 16 | export function createMultipartFormData( 17 | this: FormData | void, 18 | formBody: Record, 19 | ): FormData { 20 | const formData = this instanceof FormData ? this : new FormData(); 21 | Object.entries(formBody).forEach(([key, value]) => { 22 | if (Buffer.isBuffer(value) || value instanceof Uint8Array) { 23 | formData.append(key, new Blob([value])); 24 | } else { 25 | formData.append(key, String(value)); 26 | } 27 | }); 28 | return formData; 29 | } 30 | -------------------------------------------------------------------------------- /lib/validate-signature.ts: -------------------------------------------------------------------------------- 1 | import { Buffer } from "node:buffer"; 2 | import { createHmac, timingSafeEqual } from "node:crypto"; 3 | 4 | function s2b(str: string, encoding: BufferEncoding): Buffer { 5 | return Buffer.from(str, encoding); 6 | } 7 | 8 | function safeCompare(a: Buffer, b: Buffer): boolean { 9 | if (a.length !== b.length) { 10 | return false; 11 | } 12 | return timingSafeEqual(a, b); 13 | } 14 | 15 | export default function validateSignature( 16 | body: string | Buffer, 17 | channelSecret: string, 18 | signature: string, 19 | ): boolean { 20 | return safeCompare( 21 | createHmac("SHA256", channelSecret).update(body).digest(), 22 | s2b(signature, "base64"), 23 | ); 24 | } 25 | -------------------------------------------------------------------------------- /lib/version.ts: -------------------------------------------------------------------------------- 1 | const LINE_BOT_SDK_VERSION = "1.0.0-test"; 2 | export const USER_AGENT = `@line/bot-sdk/${LINE_BOT_SDK_VERSION}`; 3 | -------------------------------------------------------------------------------- /lib/webhook/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | unset 2 | -------------------------------------------------------------------------------- /lib/webhook/api.ts: -------------------------------------------------------------------------------- 1 | export * from "./model/models.js"; 2 | -------------------------------------------------------------------------------- /lib/webhook/model/actionResult.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ActionResult = { 14 | /** 15 | */ 16 | type: ActionResult.TypeEnum /**/; 17 | /** 18 | * Base64-encoded binary data 19 | */ 20 | data?: string /**/; 21 | }; 22 | 23 | export namespace ActionResult { 24 | export type TypeEnum = "void" | "binary"; 25 | } 26 | -------------------------------------------------------------------------------- /lib/webhook/model/activatedEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ChatControl } from "./chatControl.js"; 14 | import { DeliveryContext } from "./deliveryContext.js"; 15 | import { Event } from "./event.js"; 16 | import { EventMode } from "./eventMode.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * This event indicates that the module channel has been switched to Active Channel by calling the Acquire Control API. Sent to the webhook URL server of the module channel. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type ActivatedEvent = EventBase & { 25 | type: "activated"; 26 | /** 27 | */ 28 | chatControl: ChatControl /**/; 29 | }; 30 | 31 | export namespace ActivatedEvent {} 32 | -------------------------------------------------------------------------------- /lib/webhook/model/allMentionee.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Mentionee } from "./mentionee.js"; 14 | 15 | /** 16 | * Mentioned target is entire group 17 | */ 18 | import { MentioneeBase } from "./models.js"; 19 | 20 | export type AllMentionee = MentioneeBase & { 21 | type: "all"; 22 | }; 23 | -------------------------------------------------------------------------------- /lib/webhook/model/attachedModuleContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ModuleContent } from "./moduleContent.js"; 14 | 15 | import { ModuleContentBase } from "./models.js"; 16 | 17 | export type AttachedModuleContent = ModuleContentBase & { 18 | type: "attached"; 19 | /** 20 | * User ID of the bot on the attached LINE Official Account 21 | */ 22 | botId: string /**/; 23 | /** 24 | * An array of strings indicating the scope permitted by the admin of the LINE Official Account. 25 | */ 26 | scopes: Array /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/audioMessageContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ContentProvider } from "./contentProvider.js"; 14 | import { MessageContent } from "./messageContent.js"; 15 | 16 | import { MessageContentBase } from "./models.js"; 17 | 18 | export type AudioMessageContent = MessageContentBase & { 19 | type: "audio"; 20 | /** 21 | */ 22 | contentProvider: ContentProvider /**/; 23 | /** 24 | * Length of audio file (milliseconds) 25 | */ 26 | duration?: number /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/beaconContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type BeaconContent = { 14 | /** 15 | * Hardware ID of the beacon that was detected 16 | */ 17 | hwid: string /**/; 18 | /** 19 | * Type of beacon event. 20 | */ 21 | type: BeaconContent.TypeEnum /**/; 22 | /** 23 | * Device message of beacon that was detected. 24 | */ 25 | dm?: string /**/; 26 | }; 27 | 28 | export namespace BeaconContent { 29 | export type TypeEnum = "enter" | "banner" | "stay"; 30 | } 31 | -------------------------------------------------------------------------------- /lib/webhook/model/beaconEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { BeaconContent } from "./beaconContent.js"; 14 | import { DeliveryContext } from "./deliveryContext.js"; 15 | import { Event } from "./event.js"; 16 | import { EventMode } from "./eventMode.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Event object for when a user enters the range of a LINE Beacon. You can reply to beacon events. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type BeaconEvent = EventBase & { 25 | type: "beacon"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken: string /**/; 30 | /** 31 | */ 32 | beacon: BeaconContent /**/; 33 | }; 34 | 35 | export namespace BeaconEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/botResumedEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * This event indicates that the LINE Official Account has returned from the suspended state. Sent to the webhook URL server of the module channel. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type BotResumedEvent = EventBase & { 24 | type: "botResumed"; 25 | }; 26 | 27 | export namespace BotResumedEvent {} 28 | -------------------------------------------------------------------------------- /lib/webhook/model/botSuspendedEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * This event indicates that the LINE Official Account has been suspended (Suspend). Sent to the webhook URL server of the module channel. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type BotSuspendedEvent = EventBase & { 24 | type: "botSuspended"; 25 | }; 26 | 27 | export namespace BotSuspendedEvent {} 28 | -------------------------------------------------------------------------------- /lib/webhook/model/chatControl.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ChatControl = { 14 | /** 15 | */ 16 | expireAt: number /**/; 17 | }; 18 | -------------------------------------------------------------------------------- /lib/webhook/model/contentProvider.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Provider of the media file. 15 | */ 16 | export type ContentProvider = { 17 | /** 18 | * Provider of the image file. 19 | */ 20 | type: ContentProvider.TypeEnum /**/; 21 | /** 22 | * URL of the image file. Only included when contentProvider.type is external. 23 | */ 24 | originalContentUrl?: string /**/; 25 | /** 26 | * URL of the preview image. Only included when contentProvider.type is external. 27 | */ 28 | previewImageUrl?: string /**/; 29 | }; 30 | 31 | export namespace ContentProvider { 32 | export type TypeEnum = "line" | "external"; 33 | } 34 | -------------------------------------------------------------------------------- /lib/webhook/model/deactivatedEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * This event indicates that the module channel has been switched to Standby Channel by calling Acquire Control API or Release Control API. Sent to the webhook URL server of the module channel. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type DeactivatedEvent = EventBase & { 24 | type: "deactivated"; 25 | }; 26 | 27 | export namespace DeactivatedEvent {} 28 | -------------------------------------------------------------------------------- /lib/webhook/model/deliveryContext.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * webhook\'s delivery context information 15 | */ 16 | export type DeliveryContext = { 17 | /** 18 | * Whether the webhook event is a redelivered one or not. 19 | */ 20 | isRedelivery: boolean /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/webhook/model/detachedModuleContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ModuleContent } from "./moduleContent.js"; 14 | 15 | import { ModuleContentBase } from "./models.js"; 16 | 17 | export type DetachedModuleContent = ModuleContentBase & { 18 | type: "detached"; 19 | /** 20 | * Detached LINE Official Account bot user ID 21 | */ 22 | botId: string /**/; 23 | /** 24 | * Reason for detaching 25 | */ 26 | reason: DetachedModuleContent.ReasonEnum /**/; 27 | }; 28 | 29 | export namespace DetachedModuleContent { 30 | export type ReasonEnum = "bot_deleted"; 31 | } 32 | -------------------------------------------------------------------------------- /lib/webhook/model/emoji.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type Emoji = { 14 | /** 15 | * Index position for a character in text, with the first character being at position 0. 16 | */ 17 | index: number /**/; 18 | /** 19 | * The length of the LINE emoji string. For LINE emoji (hello), 7 is the length. 20 | */ 21 | length: number /**/; 22 | /** 23 | * Product ID for a LINE emoji set. 24 | */ 25 | productId: string /**/; 26 | /** 27 | * ID for a LINE emoji inside a set. 28 | */ 29 | emojiId: string /**/; 30 | }; 31 | -------------------------------------------------------------------------------- /lib/webhook/model/eventMode.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Channel state. 15 | */ 16 | 17 | export type EventMode = "active" | "standby"; 18 | -------------------------------------------------------------------------------- /lib/webhook/model/fileMessageContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MessageContent } from "./messageContent.js"; 14 | 15 | import { MessageContentBase } from "./models.js"; 16 | 17 | export type FileMessageContent = MessageContentBase & { 18 | type: "file"; 19 | /** 20 | * File name 21 | */ 22 | fileName: string /**/; 23 | /** 24 | * File size in bytes 25 | */ 26 | fileSize: number /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/followDetail.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type FollowDetail = { 14 | /** 15 | * Whether a user has added your LINE Official Account as a friend or unblocked. 16 | */ 17 | isUnblocked: boolean /**/; 18 | }; 19 | -------------------------------------------------------------------------------- /lib/webhook/model/followEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { FollowDetail } from "./followDetail.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Event object for when your LINE Official Account is added as a friend (or unblocked). You can reply to follow events. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type FollowEvent = EventBase & { 25 | type: "follow"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken: string /**/; 30 | /** 31 | */ 32 | follow: FollowDetail /**/; 33 | }; 34 | 35 | export namespace FollowEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/groupSource.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Source } from "./source.js"; 14 | 15 | import { SourceBase } from "./models.js"; 16 | 17 | export type GroupSource = SourceBase & { 18 | type: "group"; 19 | /** 20 | * Group ID of the source group chat 21 | */ 22 | groupId: string /**/; 23 | /** 24 | * ID of the source user. Only included in message events. Only users of LINE for iOS and LINE for Android are included in userId. 25 | */ 26 | userId?: string /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/imageMessageContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ContentProvider } from "./contentProvider.js"; 14 | import { ImageSet } from "./imageSet.js"; 15 | import { MessageContent } from "./messageContent.js"; 16 | 17 | import { MessageContentBase } from "./models.js"; 18 | 19 | export type ImageMessageContent = MessageContentBase & { 20 | type: "image"; 21 | /** 22 | */ 23 | contentProvider: ContentProvider /**/; 24 | /** 25 | */ 26 | imageSet?: ImageSet /**/; 27 | /** 28 | * Quote token to quote this message. 29 | */ 30 | quoteToken: string /**/; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/webhook/model/imageSet.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type ImageSet = { 14 | /** 15 | * Image set ID. Only included when multiple images are sent simultaneously. 16 | */ 17 | id: string /**/; 18 | /** 19 | * An index starting from 1, indicating the image number in a set of images sent simultaneously. Only included when multiple images are sent simultaneously. However, it won\'t be included if the sender is using LINE 11.15 or earlier for Android. 20 | */ 21 | index?: number /**/; 22 | /** 23 | * The total number of images sent simultaneously. 24 | */ 25 | total?: number /**/; 26 | }; 27 | -------------------------------------------------------------------------------- /lib/webhook/model/joinEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * Event object for when your LINE Official Account joins a group chat or multi-person chat. You can reply to join events. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type JoinEvent = EventBase & { 24 | type: "join"; 25 | /** 26 | * Reply token used to send reply message to this event 27 | */ 28 | replyToken: string /**/; 29 | }; 30 | 31 | export namespace JoinEvent {} 32 | -------------------------------------------------------------------------------- /lib/webhook/model/joinedMembers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { UserSource } from "./userSource.js"; 14 | 15 | export type JoinedMembers = { 16 | /** 17 | * Users who joined. Array of source user objects. 18 | */ 19 | members: Array /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/webhook/model/joinedMembershipContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MembershipContent } from "./membershipContent.js"; 14 | 15 | import { MembershipContentBase } from "./models.js"; 16 | 17 | export type JoinedMembershipContent = MembershipContentBase & { 18 | type: "joined"; 19 | /** 20 | * The ID of the membership that the user joined. This is defined for each membership. 21 | */ 22 | membershipId: number /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/leaveEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * Event object for when a user removes your LINE Official Account from a group chat or when your LINE Official Account leaves a group chat or multi-person chat. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type LeaveEvent = EventBase & { 24 | type: "leave"; 25 | }; 26 | 27 | export namespace LeaveEvent {} 28 | -------------------------------------------------------------------------------- /lib/webhook/model/leftMembers.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { UserSource } from "./userSource.js"; 14 | 15 | export type LeftMembers = { 16 | /** 17 | * Users who left. Array of source user objects. 18 | */ 19 | members: Array /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/webhook/model/leftMembershipContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MembershipContent } from "./membershipContent.js"; 14 | 15 | import { MembershipContentBase } from "./models.js"; 16 | 17 | export type LeftMembershipContent = MembershipContentBase & { 18 | type: "left"; 19 | /** 20 | * The ID of the membership that the user left. This is defined for each membership. 21 | */ 22 | membershipId: number /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/linkContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * Content of the account link event. 15 | */ 16 | export type LinkContent = { 17 | /** 18 | * One of the following values to indicate whether linking the account was successful or not 19 | */ 20 | result: LinkContent.ResultEnum /**/; 21 | /** 22 | * Specified nonce (number used once) when verifying the user ID. 23 | */ 24 | nonce: string /**/; 25 | }; 26 | 27 | export namespace LinkContent { 28 | export type ResultEnum = "ok" | "failed"; 29 | } 30 | -------------------------------------------------------------------------------- /lib/webhook/model/linkThingsContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ThingsContent } from "./thingsContent.js"; 14 | 15 | import { ThingsContentBase } from "./models.js"; 16 | 17 | export type LinkThingsContent = ThingsContentBase & { 18 | type: "link"; 19 | /** 20 | * Device ID of the device that has been linked with LINE. 21 | */ 22 | deviceId: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/locationMessageContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MessageContent } from "./messageContent.js"; 14 | 15 | import { MessageContentBase } from "./models.js"; 16 | 17 | export type LocationMessageContent = MessageContentBase & { 18 | type: "location"; 19 | /** 20 | * Title 21 | */ 22 | title?: string /**/; 23 | /** 24 | * Address 25 | */ 26 | address?: string /**/; 27 | /** 28 | * Latitude 29 | */ 30 | latitude: number /**/; 31 | /** 32 | * Longitude 33 | */ 34 | longitude: number /**/; 35 | }; 36 | -------------------------------------------------------------------------------- /lib/webhook/model/memberJoinedEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { JoinedMembers } from "./joinedMembers.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Event object for when a user joins a group chat or multi-person chat that the LINE Official Account is in. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type MemberJoinedEvent = EventBase & { 25 | type: "memberJoined"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken: string /**/; 30 | /** 31 | */ 32 | joined: JoinedMembers /**/; 33 | }; 34 | 35 | export namespace MemberJoinedEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/memberLeftEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { LeftMembers } from "./leftMembers.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Event object for when a user leaves a group chat or multi-person chat that the LINE Official Account is in. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type MemberLeftEvent = EventBase & { 25 | type: "memberLeft"; 26 | /** 27 | */ 28 | left: LeftMembers /**/; 29 | }; 30 | 31 | export namespace MemberLeftEvent {} 32 | -------------------------------------------------------------------------------- /lib/webhook/model/membershipContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { JoinedMembershipContent } from "./models.js"; 14 | import { LeftMembershipContent } from "./models.js"; 15 | import { RenewedMembershipContent } from "./models.js"; 16 | 17 | export type MembershipContent = 18 | | JoinedMembershipContent // joined 19 | | LeftMembershipContent // left 20 | | RenewedMembershipContent; // renewed 21 | 22 | /** 23 | * Content of the membership event. 24 | */ 25 | export type MembershipContentBase = { 26 | /** 27 | * Type of membership event. 28 | */ 29 | type: string /**/; 30 | }; 31 | -------------------------------------------------------------------------------- /lib/webhook/model/membershipEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { MembershipContent } from "./membershipContent.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * This event indicates that a user has subscribed (joined), unsubscribed (left), or renewed the bot\'s membership. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type MembershipEvent = EventBase & { 25 | type: "membership"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken: string /**/; 30 | /** 31 | */ 32 | membership: MembershipContent /**/; 33 | }; 34 | 35 | export namespace MembershipEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/mention.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Mentionee } from "./mentionee.js"; 14 | 15 | export type Mention = { 16 | /** 17 | * Array of one or more mention objects. Max: 20 mentions 18 | */ 19 | mentionees: Array /**/; 20 | }; 21 | -------------------------------------------------------------------------------- /lib/webhook/model/messageEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { MessageContent } from "./messageContent.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Webhook event object which contains the sent message. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type MessageEvent = EventBase & { 25 | type: "message"; 26 | /** 27 | */ 28 | replyToken?: string /**/; 29 | /** 30 | */ 31 | message: MessageContent /**/; 32 | }; 33 | 34 | export namespace MessageEvent {} 35 | -------------------------------------------------------------------------------- /lib/webhook/model/moduleContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { AttachedModuleContent } from "./models.js"; 14 | import { DetachedModuleContent } from "./models.js"; 15 | 16 | export type ModuleContent = 17 | | AttachedModuleContent // attached 18 | | DetachedModuleContent; // detached 19 | 20 | export type ModuleContentBase = { 21 | /** 22 | * Type 23 | */ 24 | type: string /**/; 25 | }; 26 | -------------------------------------------------------------------------------- /lib/webhook/model/moduleEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { ModuleContent } from "./moduleContent.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * This event indicates that the module channel has been attached to the LINE Official Account. Sent to the webhook URL server of the module channel. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type ModuleEvent = EventBase & { 25 | type: "module"; 26 | /** 27 | */ 28 | module: ModuleContent /**/; 29 | }; 30 | 31 | export namespace ModuleEvent {} 32 | -------------------------------------------------------------------------------- /lib/webhook/model/pnpDelivery.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | /** 14 | * A delivery object containing a hashed phone number string or a string specified by `X-Line-Delivery-Tag` header 15 | */ 16 | export type PnpDelivery = { 17 | /** 18 | * A hashed phone number string or a string specified by `X-Line-Delivery-Tag` header 19 | */ 20 | data: string /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/webhook/model/postbackContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type PostbackContent = { 14 | /** 15 | * Postback data 16 | */ 17 | data: string /**/; 18 | /** 19 | */ 20 | params?: { [key: string]: string } /**/; 21 | }; 22 | -------------------------------------------------------------------------------- /lib/webhook/model/postbackEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { PostbackContent } from "./postbackContent.js"; 17 | import { Source } from "./source.js"; 18 | 19 | /** 20 | * Event object for when a user performs a postback action which initiates a postback. You can reply to postback events. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type PostbackEvent = EventBase & { 25 | type: "postback"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken?: string /**/; 30 | /** 31 | */ 32 | postback: PostbackContent /**/; 33 | }; 34 | 35 | export namespace PostbackEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/renewedMembershipContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { MembershipContent } from "./membershipContent.js"; 14 | 15 | import { MembershipContentBase } from "./models.js"; 16 | 17 | export type RenewedMembershipContent = MembershipContentBase & { 18 | type: "renewed"; 19 | /** 20 | * The ID of the membership that the user renewed. This is defined for each membership. 21 | */ 22 | membershipId: number /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/roomSource.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Source } from "./source.js"; 14 | 15 | import { SourceBase } from "./models.js"; 16 | 17 | export type RoomSource = SourceBase & { 18 | type: "room"; 19 | /** 20 | * ID of the source user. Only included in message events. Only users of LINE for iOS and LINE for Android are included in userId. 21 | */ 22 | userId?: string /**/; 23 | /** 24 | * Room ID of the source multi-person chat 25 | */ 26 | roomId: string /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/scenarioResultThingsContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ScenarioResult } from "./scenarioResult.js"; 14 | import { ThingsContent } from "./thingsContent.js"; 15 | 16 | import { ThingsContentBase } from "./models.js"; 17 | 18 | export type ScenarioResultThingsContent = ThingsContentBase & { 19 | type: "scenarioResult"; 20 | /** 21 | * Device ID of the device that has been linked with LINE. 22 | */ 23 | deviceId: string /**/; 24 | /** 25 | */ 26 | result: ScenarioResult /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/source.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { GroupSource } from "./models.js"; 14 | import { RoomSource } from "./models.js"; 15 | import { UserSource } from "./models.js"; 16 | 17 | export type Source = 18 | | GroupSource // group 19 | | RoomSource // room 20 | | UserSource; // user 21 | 22 | /** 23 | * the source of the event. 24 | */ 25 | export type SourceBase = { 26 | /** 27 | * source type 28 | * 29 | * @see type Documentation 30 | */ 31 | type: string /**/; 32 | }; 33 | -------------------------------------------------------------------------------- /lib/webhook/model/thingsContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { LinkThingsContent } from "./models.js"; 14 | import { ScenarioResultThingsContent } from "./models.js"; 15 | import { UnlinkThingsContent } from "./models.js"; 16 | 17 | export type ThingsContent = 18 | | LinkThingsContent // link 19 | | ScenarioResultThingsContent // scenarioResult 20 | | UnlinkThingsContent; // unlink 21 | 22 | export type ThingsContentBase = { 23 | /** 24 | * Type 25 | */ 26 | type: string /**/; 27 | }; 28 | -------------------------------------------------------------------------------- /lib/webhook/model/thingsEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | import { ThingsContent } from "./thingsContent.js"; 18 | 19 | /** 20 | * Indicates that a user linked a device with LINE. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type ThingsEvent = EventBase & { 25 | type: "things"; 26 | /** 27 | * Reply token used to send reply message to this event 28 | */ 29 | replyToken: string /**/; 30 | /** 31 | */ 32 | things: ThingsContent /**/; 33 | }; 34 | 35 | export namespace ThingsEvent {} 36 | -------------------------------------------------------------------------------- /lib/webhook/model/unfollowEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | 18 | /** 19 | * Event object for when your LINE Official Account is blocked. 20 | */ 21 | import { EventBase } from "./models.js"; 22 | 23 | export type UnfollowEvent = EventBase & { 24 | type: "unfollow"; 25 | }; 26 | 27 | export namespace UnfollowEvent {} 28 | -------------------------------------------------------------------------------- /lib/webhook/model/unlinkThingsContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ThingsContent } from "./thingsContent.js"; 14 | 15 | import { ThingsContentBase } from "./models.js"; 16 | 17 | export type UnlinkThingsContent = ThingsContentBase & { 18 | type: "unlink"; 19 | /** 20 | * Device ID of the device that has been linked with LINE. 21 | */ 22 | deviceId: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/unsendDetail.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type UnsendDetail = { 14 | /** 15 | * The message ID of the unsent message 16 | */ 17 | messageId: string /**/; 18 | }; 19 | -------------------------------------------------------------------------------- /lib/webhook/model/unsendEvent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { DeliveryContext } from "./deliveryContext.js"; 14 | import { Event } from "./event.js"; 15 | import { EventMode } from "./eventMode.js"; 16 | import { Source } from "./source.js"; 17 | import { UnsendDetail } from "./unsendDetail.js"; 18 | 19 | /** 20 | * Event object for when the user unsends a message. 21 | */ 22 | import { EventBase } from "./models.js"; 23 | 24 | export type UnsendEvent = EventBase & { 25 | type: "unsend"; 26 | /** 27 | */ 28 | unsend: UnsendDetail /**/; 29 | }; 30 | 31 | export namespace UnsendEvent {} 32 | -------------------------------------------------------------------------------- /lib/webhook/model/userMentionee.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Mentionee } from "./mentionee.js"; 14 | 15 | /** 16 | * Mentioned target is user 17 | */ 18 | import { MentioneeBase } from "./models.js"; 19 | 20 | export type UserMentionee = MentioneeBase & { 21 | type: "user"; 22 | /** 23 | * User ID of the mentioned user. Only included if mention.mentions[].type is user and the user consents to the LINE Official Account obtaining their user profile information. 24 | */ 25 | userId?: string /**/; 26 | /** 27 | * Whether the mentioned user is the bot that receives the webhook. 28 | */ 29 | isSelf?: boolean /**/; 30 | }; 31 | -------------------------------------------------------------------------------- /lib/webhook/model/userSource.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { Source } from "./source.js"; 14 | 15 | import { SourceBase } from "./models.js"; 16 | 17 | export type UserSource = SourceBase & { 18 | type: "user"; 19 | /** 20 | * ID of the source user 21 | */ 22 | userId?: string /**/; 23 | }; 24 | -------------------------------------------------------------------------------- /lib/webhook/model/videoMessageContent.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | import { ContentProvider } from "./contentProvider.js"; 14 | import { MessageContent } from "./messageContent.js"; 15 | 16 | import { MessageContentBase } from "./models.js"; 17 | 18 | export type VideoMessageContent = MessageContentBase & { 19 | type: "video"; 20 | /** 21 | * Length of video file (milliseconds) 22 | */ 23 | duration?: number /**/; 24 | /** 25 | */ 26 | contentProvider: ContentProvider /**/; 27 | /** 28 | * Quote token to quote this message. 29 | */ 30 | quoteToken: string /**/; 31 | }; 32 | -------------------------------------------------------------------------------- /lib/webhook/model/videoPlayComplete.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Webhook Type Definition 3 | * Webhook event definition of the LINE Messaging API 4 | * 5 | * The version of the OpenAPI document: 1.0.0 6 | * 7 | * 8 | * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). 9 | * https://openapi-generator.tech 10 | * Do not edit the class manually. 11 | */ 12 | 13 | export type VideoPlayComplete = { 14 | /** 15 | * ID used to identify a video. Returns the same value as the trackingId assigned to the video message. 16 | */ 17 | trackingId: string /**/; 18 | }; 19 | -------------------------------------------------------------------------------- /test/helpers/line-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/line/line-bot-sdk-nodejs/526e5bbb83e41d1b9e5be5c28c45f65c6eb85287/test/helpers/line-icon.png -------------------------------------------------------------------------------- /test/helpers/stream.ts: -------------------------------------------------------------------------------- 1 | import { Readable } from "node:stream"; 2 | 3 | export function getStreamData(stream: Readable): Promise { 4 | return new Promise(resolve => { 5 | let result: string = ""; 6 | stream.on("data", (chunk: Buffer) => { 7 | result += chunk.toString(); 8 | }); 9 | stream.on("end", () => { 10 | resolve(result); 11 | }); 12 | }); 13 | } 14 | -------------------------------------------------------------------------------- /test/helpers/stream.txt: -------------------------------------------------------------------------------- 1 | hello, stream! 2 | -------------------------------------------------------------------------------- /test/libs-webhook.spec.ts: -------------------------------------------------------------------------------- 1 | import { webhook } from "../lib/index.js"; 2 | 3 | import { describe, it } from "vitest"; 4 | 5 | describe("webhook", () => { 6 | it("event", async () => { 7 | const event: webhook.Event = { 8 | type: "message", 9 | replyToken: "aaaa", 10 | message: { 11 | type: "text", 12 | id: "aaaaaa", 13 | text: "hello", 14 | quoteToken: "bbbbbb", 15 | }, 16 | timestamp: 333333, 17 | mode: "active", 18 | webhookEventId: "cccccc", 19 | deliveryContext: { 20 | isRedelivery: false, 21 | }, 22 | }; 23 | 24 | console.assert(event.type === "message"); 25 | }); 26 | 27 | it("unknownEvent", async () => { 28 | const event: webhook.Event = { 29 | type: "greatNewEvent", 30 | greatNewField: "aaaa", 31 | timestamp: 333333, 32 | mode: "active", 33 | webhookEventId: "cccccc", 34 | deliveryContext: { 35 | isRedelivery: false, 36 | }, 37 | }; 38 | 39 | console.assert(event.type === "greatNewEvent"); 40 | }); 41 | }); 42 | -------------------------------------------------------------------------------- /test/utils.spec.ts: -------------------------------------------------------------------------------- 1 | import { ensureJSON } from "../lib/utils.js"; 2 | import { JSONParseError } from "../lib/exceptions.js"; 3 | import { equal, ok } from "node:assert"; 4 | 5 | import { describe, it } from "vitest"; 6 | 7 | describe("utils", () => { 8 | describe("ensureJSON", () => { 9 | it("fails when input isn't an object", () => { 10 | let input = "not Object"; 11 | try { 12 | ensureJSON(input); 13 | ok(false); 14 | } catch (err) { 15 | equal( 16 | (err as JSONParseError).message, 17 | "Failed to parse response body as JSON", 18 | ); 19 | } 20 | }); 21 | }); 22 | }); 23 | -------------------------------------------------------------------------------- /test/validate-signature.spec.ts: -------------------------------------------------------------------------------- 1 | import { ok } from "node:assert"; 2 | import validateSignature from "../lib/validate-signature.js"; 3 | 4 | import { describe, it } from "vitest"; 5 | 6 | const body = { hello: "world" }; 7 | const secret = "test_secret"; 8 | 9 | describe("validateSignature", () => { 10 | it("success", () => { 11 | const validSignature = "t7Hn4ZDHqs6e+wdvI5TyQIvzie0DmMUmuXEBqyyE/tM="; 12 | ok(validateSignature(JSON.stringify(body), secret, validSignature)); 13 | }); 14 | 15 | it("failure", () => { 16 | const invalidSignature = "t7Hn4ZDHqs6e+wdvi5TyQivzie0DmMUmuXEBqyyE/tM="; 17 | ok(!validateSignature(JSON.stringify(body), secret, invalidSignature)); 18 | }); 19 | }); 20 | -------------------------------------------------------------------------------- /tsconfig.cjs.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "CommonJS", 4 | "target": "es2017", 5 | "outDir": "./dist/cjs", 6 | "sourceMap": true, 7 | "declarationMap": true, 8 | "declaration": true, 9 | "rootDirs": ["lib"] 10 | }, 11 | "include": [ 12 | "lib/**/*.ts", 13 | ], 14 | "exclude": [ 15 | "node_modules", 16 | "dist", 17 | ".git" 18 | ] 19 | } 20 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "module": "ESNext", 4 | "moduleResolution": "Bundler", 5 | "target": "ES2022", 6 | "esModuleInterop": true, 7 | "noImplicitAny": true, 8 | "newLine": "LF", 9 | "sourceMap": true, 10 | "declarationMap": true, 11 | "outDir": "dist", 12 | "rootDirs": ["lib", "test"], 13 | "declaration": true, 14 | }, 15 | "include": [ 16 | "lib/**/*.ts", 17 | ], 18 | "exclude": [ 19 | "node_modules", 20 | "dist", 21 | ".git" 22 | ], 23 | } 24 | -------------------------------------------------------------------------------- /vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vitest/config' 2 | 3 | export default defineConfig({ 4 | test: { 5 | include: [ 6 | "test/**/*.spec.ts", 7 | "lib/**/tests/**/*.spec.ts" 8 | ] 9 | }, 10 | }) 11 | --------------------------------------------------------------------------------