Repository navigation
v11.3.0 Support templated LINE notification messages (PNP) and custom aggregation units
·
38 commits
to master
since this release
Immutable
release. Only release title and notes can be modified.
This version adds the templated LINE notification message (PNP) API, and lets you assign a custom aggregation unit (CAU) to LINE notification messages.
Schema changes: line/line-openapi#131
What's new
- Templated PNP
- Send — send a message built from a template registered in advance, by specifying a
templateKeyand substituting values into the template'semphasizedItem,items, andbuttons. New endpoint:POST /v2/bot/message/pnp/templated/push. - Analytics — get the number of sent templated notification messages. New endpoint:
GET /v2/bot/message/delivery/pnp/templated.
- Send — send a message built from a template registered in advance, by specifying a
- Custom aggregation unit — assign a custom aggregation unit to LINE notification messages (both templated and flexible) via
customAggregationUnits, so their delivery can be aggregated per unit with the existing unit-based statistics APIs.
This is a partner-only feature that requires an application. For more details, see:
- Templated LINE notification message: https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/
- LINE notification messages API reference: https://developers.line.biz/en/reference/line-notification-messages/
- Custom aggregation units: https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/
Example: send a templated LINE notification message
import { messagingApi } from "@line/bot-sdk";
const client = new messagingApi.MessagingApiClient({
channelAccessToken: process.env.CHANNEL_ACCESS_TOKEN ?? "",
});
const request: messagingApi.PnpTemplatedMessageRequest = {
// Phone number normalized to E.164 and hashed with SHA256
to: "0123...hashed_phone_number...cdef",
templateKey: "order_confirmation",
body: {
emphasizedItem: { itemKey: "amount", content: "$42.00" },
items: [
{ itemKey: "order_id", content: "A1234567" },
{ itemKey: "shop_name", content: "LINE Store" },
],
buttons: [
{ buttonKey: "detail", url: "https://example.com/orders/A1234567" },
],
},
customAggregationUnits: ["promotion_a"],
};
// The second argument is the X-Line-Delivery-Tag (16-100 chars),
// which is returned in the delivery completion webhook.
await client.pushTemplatedMessagesByPhone(request, "order-A1234567-0001");Example: get the number of sent templated notification messages
import { messagingApi } from "@line/bot-sdk";
const client = new messagingApi.MessagingApiClient({
channelAccessToken: process.env.CHANNEL_ACCESS_TOKEN ?? "",
});
// GET /v2/bot/message/delivery/pnp/templated (date: yyyyMMdd, UTC+9)
const response = await client.getPNPTemplatedMessageStatistics("20240916");
console.log(response.status); // "ready" | "unready" | "unavailable_for_privacy" | "out_of_service"
if (response.status === "ready") {
console.log(response.success);
}What's Changed
line-openapi updates
- Update line-openapi digest to de8bd9e by @renovate[bot] in #1755
- Add Templated LINE notification message API and custom aggregation units for PNP by @github-actions[bot] in #1827
Dependency updates
- Lock file maintenance by @renovate[bot] in #1712
- Update dependency @line/bot-sdk to v11.1.0 by @renovate[bot] in #1713
- Lock file maintenance by @renovate[bot] in #1714
- Lock file maintenance by @renovate[bot] in #1715
- Lock file maintenance by @renovate[bot] in #1716
- Update dependency typedoc to v0.28.20 by @renovate[bot] in #1717
- Update vitest monorepo to v4.1.10 by @renovate[bot] in #1718
- Update dependency oxc-minify to ^0.139.0 by @renovate[bot] in #1719
- Update dependency vitepress to v2.0.0-alpha.18 by @renovate[bot] in #1720
- Update dependency @line/bot-sdk to v11.2.0 by @renovate[bot] in #1721
- Lock file maintenance by @renovate[bot] in #1722
- Update actions/setup-java action to v5.5.0 by @renovate[bot] in #1724
- Update dependency msw to v2.14.7 by @renovate[bot] in #1723
- Update dependency @types/node to v24.13.3 by @renovate[bot] in #1725
- Update dependency msw to v2.15.0 by @renovate[bot] in #1726
- Lock file maintenance by @renovate[bot] in #1728
- Update npm tool constraint to v12 by @renovate[bot] in #1729
- Update dependency prettier to v3.9.5 by @renovate[bot] in #1731
- Update dependency @arethetypeswrong/cli to v0.18.5 by @renovate[bot] in #1732
- Update actions/stale action to v10.4.0 by @renovate[bot] in #1733
- Lock file maintenance by @renovate[bot] in #1734
- Update npm tool constraint to v12.0.1 by @renovate[bot] in #1735
- Update junit-framework monorepo to v6.1.2 by @renovate[bot] in #1736
- Update actions/setup-node action to v6.5.0 by @renovate[bot] in #1737
- Update actions/setup-node action to v7 by @renovate[bot] in #1738
- Update dependency oxc-minify to ^0.140.0 by @renovate[bot] in #1739
- Lock file maintenance by @renovate[bot] in #1740
- Update actions/setup-java action to v5.6.0 by @renovate[bot] in #1741
- Lock file maintenance by @renovate[bot] in #1742
- Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.5.1 by @renovate[bot] in #1744
- Lock file maintenance by @renovate[bot] in #1745
- Update openapi-generator-version to v7.24.0 by @renovate[bot] in #1746
- Update actions/checkout action to v7.0.1 by @renovate[bot] in #1748
- Lock file maintenance by @renovate[bot] in #1749
- Update dependency prettier to v3.9.6 by @renovate[bot] in #1753
- Update dependency oxc-minify to ^0.141.0 by @renovate[bot] in #1754
- Update dependency publint to v0.3.22 by @renovate[bot] in #1757
- Lock file maintenance by @renovate[bot] in #1756
- Lock file maintenance by @renovate[bot] in #1759
- Lock file maintenance by @renovate[bot] in #1760
- Lock file maintenance by @renovate[bot] in #1761
- Lock file maintenance by @renovate[bot] in #1762
- Update dependency oxc-minify to ^0.142.0 by @renovate[bot] in #1763
- Update actions/stale action to v11 by @renovate[bot] in #1764
- Lock file maintenance by @renovate[bot] in #1765
- Lock file maintenance by @renovate[bot] in #1766
- Update npm tool constraint to v12.0.2 by @renovate[bot] in #1767
- Lock file maintenance by @renovate[bot] in #1768
- Update actions/setup-java action to v5.7.0 by @renovate[bot] in #1769
- Lock file maintenance by @renovate[bot] in #1771
- Update dependency vitepress to v2.0.0-alpha.19 by @renovate[bot] in #1772
- Update dependency oxc-minify to ^0.143.0 by @renovate[bot] in #1774
- Lock file maintenance by @renovate[bot] in #1776
- Update dependency publint to v0.3.23 by @renovate[bot] in #1777
- Lock file maintenance by @renovate[bot] in #1778
- Update junit-framework monorepo to v6.1.3 by @renovate[bot] in #1781
- Lock file maintenance by @renovate[bot] in #1782
- Update dependency oxc-minify to ^0.144.0 by @renovate[bot] in #1783
- Lock file maintenance by @renovate[bot] in #1784
- Lock file maintenance by @renovate[bot] in #1785
- Update vitest monorepo to v4.1.11 by @renovate[bot] in #1786
- Update dependency oxc-minify to ^0.145.0 by @renovate[bot] in #1787
- Update dependency publint to v0.3.24 by @renovate[bot] in #1788
- Update dependency oxc-minify to ^0.146.0 by @renovate[bot] in #1789
- Lock file maintenance by @renovate[bot] in #1790
- Update openapi-generator-version to v7.25.0 by @renovate[bot] in #1792
- Lock file maintenance by @renovate[bot] in #1791
- Update dependency oxc-minify to ^0.147.0 by @renovate[bot] in #1793
- Update actions/setup-java action to v6 by @renovate[bot] in #1794
- Lock file maintenance by @renovate[bot] in #1796
- Lock file maintenance by @renovate[bot] in #1799
- Lock file maintenance by @renovate[bot] in #1800
- Update dependency org.apache.maven.plugins:maven-compiler-plugin to v3.16.0 by @renovate[bot] in #1801
- Lock file maintenance by @renovate[bot] in #1802
- Update dependency org.apache.maven.plugins:maven-surefire-plugin to v3.6.0 by @renovate[bot] in #1803
- Update dependency oxc-minify to ^0.148.0 by @renovate[bot] in #1804
- Update actions/deploy-pages action to v5.0.1 by @renovate[bot] in #1805
- Lock file maintenance by @renovate[bot] in #1806
- Update dependency vitepress to v2.0.0-alpha.20 by @renovate[bot] in #1808
- Lock file maintenance by @renovate[bot] in #1809
- Update dependency oxc-minify to ^0.149.0 by @renovate[bot] in #1810
- Lock file maintenance by @renovate[bot] in #1811
- Lock file maintenance by @renovate[bot] in #1812
- Update actions/setup-java action to v6.0.1 by @renovate[bot] in #1813
- Update dependency @types/node to v24.13.4 by @renovate[bot] in #1814
- Update dependency org.codehaus.mojo:build-helper-maven-plugin to v3.6.2 by @renovate[bot] in #1815
- Lock file maintenance by @renovate[bot] in #1816
- Update dependency oxc-minify to ^0.150.0 by @renovate[bot] in #1817
- Update dependency @types/node to v24.13.5 by @renovate[bot] in #1818
- Update dependency prettier to v3.9.7 by @renovate[bot] in #1819
- Update vitest monorepo to v5 by @renovate[bot] in #1807
- Update dependency prettier to v3.9.8 by @renovate[bot] in #1820
- Update dependency typedoc-plugin-markdown to v4.13.1 by @renovate[bot] in #1821
- Update dependency @types/node to v24.13.6 by @renovate[bot] in #1822
- Lock file maintenance by @renovate[bot] in #1823
- Lock file maintenance by @renovate[bot] in #1824
- Update dependency oxc-minify to ^0.151.0 by @renovate[bot] in #1825
- Lock file maintenance by @renovate[bot] in #1826
Other Changes
- Fix npm audit vulnerability and exclude gitignored paths from npm-audit.sh by @mokuzon in #1752
- Omit undefined multipart fields by @Yang-33 in #1775
- Close npm audit reminder automatically by @Yang-33 in #1773
- Update dependency typescript to v7 by @mokuzon in #1730
Full Changelog: v11.2.0...v11.3.0
This release is prepared by @mokuzon