Line Bot Sdk Nodejs Versions Save

LINE Messaging API SDK for Node.js

v9.2.2

1 week ago

What's Changed

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.2.1...v9.2.2

v9.2.1

1 week ago

What's Changed

A type indicating Unknown* were defined for TypeScript but not used, so they have been removed. While this could be considered a breaking change, there should be no existing usage, so we're treating it as a bug fix.

line-openapi updates

Dependency updates

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.2.0...v9.2.1

v9.2.0

3 weeks ago

What's Changed

In the Messaging API, we've added a new endpoint that allows you to display a loading animation. After your LINE Official Account receives a message from a user, the response may takes some time due to message preparation or reservation processing. In such cases, you can visually tell the user that you want them to wait by displaying a loading animation.

news: https://developers.line.biz/en/news/2024/04/17/loading-indicator/

loading-animation 7aad3d6c

https://github.com/line/line-openapi/pull/54

line-openapi updates

Dependency updates

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.1.0...v9.2.0

v9.1.0

1 month ago

What's Changed

[1] Support dual package

We're thrilled to announce the line/line-bot-sdk-nodejs project update to version 9.1.0! Transitioning from CommonJS (CJS) to ECMAScript Modules (ESM), we've also enhanced the library with dual package support. Now, users can utilize the library in both CJS and ESM formats. This pivotal upgrade boosts compatibility and flexibility across various runtime environments and tool ecosystems.

[2] Membership API

The Membership API is now available in the Messaging API. With this update, our SDK also supports the use of this API. For more details, check out the announcement: https://developers.line.biz/en/news/2024/03/28/re-release-endpoints-for-membership

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.0.4...v9.1.0

v9.0.4

1 month ago

What's Changed

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.0.3...v9.0.4

v9.0.3

2 months ago

What's Changed

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.0.2...v9.0.3

v9.0.2

2 months ago

What's Changed

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.0.1...v9.0.2

v9.0.1

2 months ago

What's Changed

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v9.0.0...v9.0.1

v9.0.0

2 months ago

v9.0.0 - Removal of axios and Error Handling Changes

(1) In version 9.0.0, we have removed the axios dependency from the auto-generated clients, now utilizing the native fetch() method. (Note that deprecated client will continue to use axios.) We would like to express our gratitude to @tokuhirom for implementing this change to use the native fetch(). Thank you very much for your contribution!!

(2) With the removal of axios, the structure of errors has been modified. This is a 💣breaking change💣, and users who are handling errors will need to modify your own code when using v9.0.0 of the line-bot-sdk-nodejs. (The error structure for deprecated client remains unchanged.) New error is HTTPFetchError, which was HTTPError. Thus clients(except for deprecated client) won't throw HTTPError in v9.0.0.

Here is a brief overview of the differences. Retrieving the HTTP status code, headers, and error body from the Messaging API has become much simpler.

(For version < 9.0.0)

const client = new MessagingApiClient({
    channelAccessToken: 'YOUR_CHANNEL_ACCESS_TOKEN',
});
client
  .replyMessage({
    replyToken: replyToken,
    messages: [message]
   })
  .catch((err) => {
    if (err instanceof HTTPError) {
      // Displaying the HTTP status code, headers, and error body in sequence
      console.error(err.originalError.response.status);
      console.error(err.originalError.response.headers.get('x-line-request-id'));
      console.error(err.originalError.response.data);
    }
  });

(For version >= 9.0.0)

const client = new MessagingApiClient({
    channelAccessToken: 'YOUR_CHANNEL_ACCESS_TOKEN',
});
client
  .replyMessage({
    replyToken: replyToken,
    messages: [message]
   })
  .catch((err) => {
    if (err instanceof HTTPFetchError) { // 👈 client newly throws `HTTPFetchError` instead of `HTTPError`
      // Displaying the HTTP status code, headers, and error body in sequence
      console.error(err.status); // 👈 HTTP status code is in `HTTPFetchError`
      console.error(err.headers.get('x-line-request-id')); // 👈 headers are in `HTTPFetchError`
      console.error(err.body); // 👈 error body is in `HTTPFetchError`
    }
  });

(3) New ~WithHttpInfo functions provide raw response

New ~WithHttpInfo functions have been added. These functions return both the response itself and the parsed response body. This allows careful SDK users to obtain information such as (1) HTTP status codes and (2) HTTP response headers even on successful requests, which was not possible before. Please see the documentation (https://line.github.io/line-bot-sdk-nodejs/guide/client.html) for more details.

What's Changed

Dependency updates

Other Changes

New Contributors

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v8.4.1...v9.0.0

v8.4.1

2 months ago

What's Changed

https://github.com/line/line-bot-sdk-nodejs/pull/709 resolve type issues reported in https://github.com/line/line-bot-sdk-nodejs/issues/708 We have updated the file upload to be more standard by using Node.js built-in FormData.

line-openapi updates

Dependency updates

Other Changes

Full Changelog: https://github.com/line/line-bot-sdk-nodejs/compare/v8.4.0...v8.4.1