@@ -41,6 +41,7 @@ import { RichMenuResponse } from "../../model/richMenuResponse.js";
4141import { RoomMemberCountResponse } from "../../model/roomMemberCountResponse.js" ;
4242import { RoomUserProfileResponse } from "../../model/roomUserProfileResponse.js" ;
4343import { SetWebhookEndpointRequest } from "../../model/setWebhookEndpointRequest.js" ;
44+ import { ShowLoadingAnimationRequest } from "../../model/showLoadingAnimationRequest.js" ;
4445import { TestWebhookEndpointRequest } from "../../model/testWebhookEndpointRequest.js" ;
4546import { TestWebhookEndpointResponse } from "../../model/testWebhookEndpointResponse.js" ;
4647import { UpdateRichMenuAliasRequest } from "../../model/updateRichMenuAliasRequest.js" ;
@@ -5057,6 +5058,92 @@ describe("MessagingApiClient", () => {
50575058 server . close ( ) ;
50585059 } ) ;
50595060
5061+ it ( "showLoadingAnimationWithHttpInfo" , async ( ) => {
5062+ let requestCount = 0 ;
5063+
5064+ const server = createServer ( ( req , res ) => {
5065+ requestCount ++ ;
5066+
5067+ equal ( req . method , "POST" ) ;
5068+ const reqUrl = new URL ( req . url , "http://localhost/" ) ;
5069+ equal ( reqUrl . pathname , "/v2/bot/chat/loading/start" ) ;
5070+
5071+ equal ( req . headers [ "authorization" ] , `Bearer ${ channel_access_token } ` ) ;
5072+ equal (
5073+ req . headers [ "user-agent" ] ,
5074+ "@line/bot-sdk/__LINE_BOT_SDK_NODEJS_VERSION__" ,
5075+ ) ;
5076+
5077+ res . writeHead ( 200 , { "Content-Type" : "application/json" } ) ;
5078+ res . end ( JSON . stringify ( { } ) ) ;
5079+ } ) ;
5080+ await new Promise ( resolve => {
5081+ server . listen ( 0 ) ;
5082+ server . on ( "listening" , resolve ) ;
5083+ } ) ;
5084+
5085+ const serverAddress = server . address ( ) ;
5086+ if ( typeof serverAddress === "string" || serverAddress === null ) {
5087+ throw new Error ( "Unexpected server address: " + serverAddress ) ;
5088+ }
5089+
5090+ const client = new MessagingApiClient ( {
5091+ channelAccessToken : channel_access_token ,
5092+ baseURL : `http://localhost:${ String ( serverAddress . port ) } /` ,
5093+ } ) ;
5094+
5095+ const res = await client . showLoadingAnimationWithHttpInfo (
5096+ // showLoadingAnimationRequest: ShowLoadingAnimationRequest
5097+ { } as unknown as ShowLoadingAnimationRequest , // paramName=showLoadingAnimationRequest
5098+ ) ;
5099+
5100+ equal ( requestCount , 1 ) ;
5101+ server . close ( ) ;
5102+ } ) ;
5103+
5104+ it ( "showLoadingAnimation" , async ( ) => {
5105+ let requestCount = 0 ;
5106+
5107+ const server = createServer ( ( req , res ) => {
5108+ requestCount ++ ;
5109+
5110+ equal ( req . method , "POST" ) ;
5111+ const reqUrl = new URL ( req . url , "http://localhost/" ) ;
5112+ equal ( reqUrl . pathname , "/v2/bot/chat/loading/start" ) ;
5113+
5114+ equal ( req . headers [ "authorization" ] , `Bearer ${ channel_access_token } ` ) ;
5115+ equal (
5116+ req . headers [ "user-agent" ] ,
5117+ "@line/bot-sdk/__LINE_BOT_SDK_NODEJS_VERSION__" ,
5118+ ) ;
5119+
5120+ res . writeHead ( 200 , { "Content-Type" : "application/json" } ) ;
5121+ res . end ( JSON . stringify ( { } ) ) ;
5122+ } ) ;
5123+ await new Promise ( resolve => {
5124+ server . listen ( 0 ) ;
5125+ server . on ( "listening" , resolve ) ;
5126+ } ) ;
5127+
5128+ const serverAddress = server . address ( ) ;
5129+ if ( typeof serverAddress === "string" || serverAddress === null ) {
5130+ throw new Error ( "Unexpected server address: " + serverAddress ) ;
5131+ }
5132+
5133+ const client = new MessagingApiClient ( {
5134+ channelAccessToken : channel_access_token ,
5135+ baseURL : `http://localhost:${ String ( serverAddress . port ) } /` ,
5136+ } ) ;
5137+
5138+ const res = await client . showLoadingAnimation (
5139+ // showLoadingAnimationRequest: ShowLoadingAnimationRequest
5140+ { } as unknown as ShowLoadingAnimationRequest , // paramName=showLoadingAnimationRequest
5141+ ) ;
5142+
5143+ equal ( requestCount , 1 ) ;
5144+ server . close ( ) ;
5145+ } ) ;
5146+
50605147 it ( "testWebhookEndpointWithHttpInfo" , async ( ) => {
50615148 let requestCount = 0 ;
50625149
0 commit comments