@openclaw/line 2026.10.2 → 2026.10.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/.setup/api-BxKwG8cd.mjs +3 -0
- package/dist/.setup/{api-CMU7bG-C.mjs → api-DPd9f0cI.mjs} +2 -2
- package/dist/.setup/{card-command-BrU6u6pm.mjs → card-command-BMLk4YKh.mjs} +15 -24
- package/dist/.setup/{channel-InKuXaRS.mjs → channel-DVuSrT_i.mjs} +161 -227
- package/dist/.setup/channel.runtime-IN_F95BO.mjs +4 -0
- package/dist/.setup/{monitor-Bb3HieCd.mjs → monitor-BY32s5Um.mjs} +68 -83
- package/dist/.setup/monitor.runtime-DKuc2SBe.mjs +2 -0
- package/dist/.setup/outbound.runtime-DLyndDng.mjs +3 -0
- package/dist/.setup/probe.runtime-D2MUF_B_.mjs +2 -0
- package/dist/.setup/{send-DAwROcyQ.mjs → send-g4gFsc9W.mjs} +51 -71
- package/dist/.setup/{send-retry-B9Nor0-J.mjs → send-retry-Dzbkz5wG.mjs} +186 -379
- package/dist/.setup/{setup-surface-1jkHGWg7.mjs → setup-surface-CYd8oqzt.mjs} +1 -1
- package/dist/.setup/{template-messages-DdF9zv_j.mjs → template-messages-CwPsGQjw.mjs} +67 -118
- package/dist/api.js +2 -2
- package/dist/channel-plugin-api.js +1 -1
- package/dist/index.js +1 -3
- package/dist/setup-api.js +1 -1
- package/dist/setup-entry.js +1 -1
- package/node_modules/@line/bot-sdk/dist/channel-access-token/api/channelAccessTokenClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/channel-access-token/api/channelAccessTokenClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/channel-access-token/api/channelAccessTokenClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/exceptions.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/exceptions.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/http-fetch.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/http-fetch.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/index.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/insight/api/insightClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/insight/api/insightClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/liff/api/liffClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/liff/api/liffClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.factory.generated.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.generated.d.ts +38 -0
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.generated.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.generated.js +46 -0
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.generated.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/line-bot-client.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceBlobClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceBlobClient.js +15 -5
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceBlobClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/manage-audience/api/manageAudienceClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiBlobClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiBlobClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiClient.d.ts +39 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiClient.js +59 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/api/messagingApiClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/models.d.ts +5 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/models.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/models.js +5 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/models.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpMessagesRequest.d.ts +5 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpMessagesRequest.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedButton.d.ts +26 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedButton.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedButton.js +14 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedButton.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedEmphasizedItem.d.ts +27 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedEmphasizedItem.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedEmphasizedItem.js +14 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedEmphasizedItem.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedItem.d.ts +26 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedItem.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedItem.js +14 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedItem.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageBody.d.ts +32 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageBody.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageBody.js +14 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageBody.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageRequest.d.ts +32 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageRequest.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageRequest.js +14 -0
- package/node_modules/@line/bot-sdk/dist/cjs/messaging-api/model/pnpTemplatedMessageRequest.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/cjs/middleware.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/module/api/lineModuleClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/module/api/lineModuleClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/module-attach/api/lineModuleAttachClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/module-attach/api/lineModuleAttachClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/shop/api/shopClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/shop/api/shopClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/utils.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/validate-signature.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/version.d.ts +1 -1
- package/node_modules/@line/bot-sdk/dist/cjs/version.js +1 -1
- package/node_modules/@line/bot-sdk/dist/exceptions.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/exceptions.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/http-fetch.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/insight/api/insightClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/liff/api/liffClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/line-bot-client.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/line-bot-client.generated.d.ts +38 -0
- package/node_modules/@line/bot-sdk/dist/line-bot-client.generated.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/line-bot-client.generated.js +46 -0
- package/node_modules/@line/bot-sdk/dist/line-bot-client.generated.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceBlobClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceBlobClient.js +15 -5
- package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceBlobClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/manage-audience/api/manageAudienceClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiBlobClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiClient.d.ts +39 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiClient.js +61 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/api/messagingApiClient.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/models.d.ts +5 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/models.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/models.js +5 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/models.js.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpMessagesRequest.d.ts +5 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpMessagesRequest.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedButton.d.ts +26 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedButton.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedButton.js +13 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedButton.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedEmphasizedItem.d.ts +27 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedEmphasizedItem.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedEmphasizedItem.js +13 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedEmphasizedItem.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedItem.d.ts +26 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedItem.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedItem.js +13 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedItem.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageBody.d.ts +32 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageBody.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageBody.js +13 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageBody.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageRequest.d.ts +32 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageRequest.d.ts.map +1 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageRequest.js +13 -0
- package/node_modules/@line/bot-sdk/dist/messaging-api/model/pnpTemplatedMessageRequest.js.map +1 -0
- package/node_modules/@line/bot-sdk/dist/module/api/lineModuleClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/module-attach/api/lineModuleAttachClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/shop/api/shopClient.d.ts.map +1 -1
- package/node_modules/@line/bot-sdk/dist/version.d.ts +1 -1
- package/node_modules/@line/bot-sdk/dist/version.js +1 -1
- package/node_modules/@line/bot-sdk/lib/line-bot-client.generated.ts +68 -0
- package/node_modules/@line/bot-sdk/lib/manage-audience/api/manageAudienceBlobClient.ts +15 -5
- package/node_modules/@line/bot-sdk/lib/messaging-api/.openapi-generator/FILES +5 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/api/messagingApiClient.ts +89 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/models.ts +5 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpMessagesRequest.ts +5 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpTemplatedButton.ts +26 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpTemplatedEmphasizedItem.ts +27 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpTemplatedItem.ts +26 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpTemplatedMessageBody.ts +33 -0
- package/node_modules/@line/bot-sdk/lib/messaging-api/model/pnpTemplatedMessageRequest.ts +33 -0
- package/node_modules/@line/bot-sdk/lib/version.ts +1 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/README.md +2 -2
- package/node_modules/@line/bot-sdk/node_modules/@types/node/async_hooks.d.ts +18 -22
- package/node_modules/@line/bot-sdk/node_modules/@types/node/buffer.buffer.d.ts +10 -5
- package/node_modules/@line/bot-sdk/node_modules/@types/node/buffer.d.ts +7 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/child_process.d.ts +5 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/crypto.d.ts +114 -47
- package/node_modules/@line/bot-sdk/node_modules/@types/node/dgram.d.ts +119 -4
- package/node_modules/@line/bot-sdk/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@line/bot-sdk/node_modules/@types/node/dns.d.ts +6 -6
- package/node_modules/@line/bot-sdk/node_modules/@types/node/events.d.ts +13 -22
- package/node_modules/@line/bot-sdk/node_modules/@types/node/fs/promises.d.ts +79 -66
- package/node_modules/@line/bot-sdk/node_modules/@types/node/fs.d.ts +153 -90
- package/node_modules/@line/bot-sdk/node_modules/@types/node/http.d.ts +94 -2
- package/node_modules/@line/bot-sdk/node_modules/@types/node/http2.d.ts +65 -18
- package/node_modules/@line/bot-sdk/node_modules/@types/node/inspector.d.ts +47 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/inspector.generated.d.ts +167 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/module.d.ts +1 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/net.d.ts +139 -15
- package/node_modules/@line/bot-sdk/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@line/bot-sdk/node_modules/@types/node/package.json +3 -18
- package/node_modules/@line/bot-sdk/node_modules/@types/node/perf_hooks.d.ts +31 -19
- package/node_modules/@line/bot-sdk/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@line/bot-sdk/node_modules/@types/node/sqlite.d.ts +153 -11
- package/node_modules/@line/bot-sdk/node_modules/@types/node/stream/consumers.d.ts +7 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/stream/web.d.ts +19 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/stream.d.ts +2 -1
- package/node_modules/@line/bot-sdk/node_modules/@types/node/test.d.ts +320 -13
- package/node_modules/@line/bot-sdk/node_modules/@types/node/tls.d.ts +50 -15
- package/node_modules/@line/bot-sdk/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +5 -0
- package/node_modules/@line/bot-sdk/node_modules/@types/node/tty.d.ts +4 -3
- package/node_modules/@line/bot-sdk/node_modules/@types/node/url.d.ts +27 -3
- package/node_modules/@line/bot-sdk/node_modules/@types/node/util.d.ts +42 -2
- package/node_modules/@line/bot-sdk/node_modules/@types/node/v8.d.ts +51 -23
- package/node_modules/@line/bot-sdk/node_modules/@types/node/vm.d.ts +52 -87
- package/node_modules/@line/bot-sdk/node_modules/@types/node/zlib.d.ts +23 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/cache-interceptor.d.ts +6 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/client.d.ts +15 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/connector.d.ts +2 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/dispatcher.d.ts +8 -5
- package/node_modules/@line/bot-sdk/node_modules/undici-types/errors.d.ts +17 -1
- package/node_modules/@line/bot-sdk/node_modules/undici-types/index.d.ts +4 -1
- package/node_modules/@line/bot-sdk/node_modules/undici-types/interceptors.d.ts +7 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/package.json +1 -1
- package/node_modules/@line/bot-sdk/node_modules/undici-types/socks5-proxy-agent.d.ts +25 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/webidl.d.ts +6 -0
- package/node_modules/@line/bot-sdk/node_modules/undici-types/websocket.d.ts +2 -0
- package/node_modules/@line/bot-sdk/package.json +10 -9
- package/package.json +5 -5
- package/dist/.setup/api-BBSLQek1.mjs +0 -3
- package/dist/.setup/channel.runtime-BEhASjr_.mjs +0 -4
- package/dist/.setup/monitor.runtime-C6Kgs5BI.mjs +0 -2
- package/dist/.setup/outbound.runtime-BwO_m4n5.mjs +0 -3
- package/dist/.setup/probe.runtime-C6LYzOHu.mjs +0 -2
|
@@ -1751,6 +1751,36 @@ export abstract class LineBotClientBase {
|
|
|
1751
1751
|
return this.clients.messagingApi.getPNPMessageStatisticsWithHttpInfo(date);
|
|
1752
1752
|
}
|
|
1753
1753
|
|
|
1754
|
+
/**
|
|
1755
|
+
* Get number of sent LINE notification messages (template)
|
|
1756
|
+
* Calls `GET https://api.line.me/v2/bot/message/delivery/pnp/templated`.
|
|
1757
|
+
* To inspect the HTTP status code or response headers, use {@link getPNPTemplatedMessageStatisticsWithHttpInfo}.
|
|
1758
|
+
* @param date Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1759
|
+
* @returns A promise resolving to the response body.
|
|
1760
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template">LINE Developers documentation</a>
|
|
1761
|
+
*/
|
|
1762
|
+
public async getPNPTemplatedMessageStatistics(
|
|
1763
|
+
date: string,
|
|
1764
|
+
): Promise<messagingApi.NumberOfMessagesResponse> {
|
|
1765
|
+
return this.clients.messagingApi.getPNPTemplatedMessageStatistics(date);
|
|
1766
|
+
}
|
|
1767
|
+
|
|
1768
|
+
/**
|
|
1769
|
+
* Get number of sent LINE notification messages (template)
|
|
1770
|
+
* Calls `GET https://api.line.me/v2/bot/message/delivery/pnp/templated`.
|
|
1771
|
+
* This method returns the response body together with the underlying `httpResponse`.
|
|
1772
|
+
* @param date Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1773
|
+
* @returns A promise resolving to the response body together with the underlying `httpResponse`.
|
|
1774
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template">LINE Developers documentation</a>
|
|
1775
|
+
*/
|
|
1776
|
+
public async getPNPTemplatedMessageStatisticsWithHttpInfo(
|
|
1777
|
+
date: string,
|
|
1778
|
+
): Promise<Types.ApiResponseType<messagingApi.NumberOfMessagesResponse>> {
|
|
1779
|
+
return this.clients.messagingApi.getPNPTemplatedMessageStatisticsWithHttpInfo(
|
|
1780
|
+
date,
|
|
1781
|
+
);
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1754
1784
|
/**
|
|
1755
1785
|
* Get profile
|
|
1756
1786
|
* Calls `GET https://api.line.me/v2/bot/profile/{userId}`.
|
|
@@ -2473,6 +2503,44 @@ export abstract class LineBotClientBase {
|
|
|
2473
2503
|
);
|
|
2474
2504
|
}
|
|
2475
2505
|
|
|
2506
|
+
/**
|
|
2507
|
+
* Send LINE notification message (template)
|
|
2508
|
+
* Calls `POST https://api.line.me/v2/bot/message/pnp/templated/push`.
|
|
2509
|
+
* To inspect the HTTP status code or response headers, use {@link pushTemplatedMessagesByPhoneWithHttpInfo}.
|
|
2510
|
+
* @param pnpTemplatedMessageRequest
|
|
2511
|
+
* @param xLineDeliveryTag String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
2512
|
+
* @returns A promise resolving to the response body.
|
|
2513
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">LINE Developers documentation</a>
|
|
2514
|
+
*/
|
|
2515
|
+
public async pushTemplatedMessagesByPhone(
|
|
2516
|
+
pnpTemplatedMessageRequest: messagingApi.PnpTemplatedMessageRequest,
|
|
2517
|
+
xLineDeliveryTag?: string,
|
|
2518
|
+
): Promise<Types.MessageAPIResponseBase> {
|
|
2519
|
+
return this.clients.messagingApi.pushTemplatedMessagesByPhone(
|
|
2520
|
+
pnpTemplatedMessageRequest,
|
|
2521
|
+
xLineDeliveryTag,
|
|
2522
|
+
);
|
|
2523
|
+
}
|
|
2524
|
+
|
|
2525
|
+
/**
|
|
2526
|
+
* Send LINE notification message (template)
|
|
2527
|
+
* Calls `POST https://api.line.me/v2/bot/message/pnp/templated/push`.
|
|
2528
|
+
* This method returns the response body together with the underlying `httpResponse`.
|
|
2529
|
+
* @param pnpTemplatedMessageRequest
|
|
2530
|
+
* @param xLineDeliveryTag String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
2531
|
+
* @returns A promise resolving to the response body together with the underlying `httpResponse`.
|
|
2532
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">LINE Developers documentation</a>
|
|
2533
|
+
*/
|
|
2534
|
+
public async pushTemplatedMessagesByPhoneWithHttpInfo(
|
|
2535
|
+
pnpTemplatedMessageRequest: messagingApi.PnpTemplatedMessageRequest,
|
|
2536
|
+
xLineDeliveryTag?: string,
|
|
2537
|
+
): Promise<Types.ApiResponseType<Types.MessageAPIResponseBase>> {
|
|
2538
|
+
return this.clients.messagingApi.pushTemplatedMessagesByPhoneWithHttpInfo(
|
|
2539
|
+
pnpTemplatedMessageRequest,
|
|
2540
|
+
xLineDeliveryTag,
|
|
2541
|
+
);
|
|
2542
|
+
}
|
|
2543
|
+
|
|
2476
2544
|
/**
|
|
2477
2545
|
* Send reply message
|
|
2478
2546
|
* Calls `POST https://api.line.me/v2/bot/message/reply`.
|
|
@@ -114,8 +114,12 @@ export class ManageAudienceBlobClient {
|
|
|
114
114
|
uploadDescription?: string,
|
|
115
115
|
): Promise<Types.ApiResponseType<Types.MessageAPIResponseBase>> {
|
|
116
116
|
const form = new FormData();
|
|
117
|
-
|
|
118
|
-
|
|
117
|
+
if (audienceGroupId !== undefined) {
|
|
118
|
+
form.append("audienceGroupId", String(audienceGroupId));
|
|
119
|
+
}
|
|
120
|
+
if (uploadDescription !== undefined) {
|
|
121
|
+
form.append("uploadDescription", String(uploadDescription));
|
|
122
|
+
}
|
|
119
123
|
form.append("file", file); // file
|
|
120
124
|
|
|
121
125
|
const res = await this.httpClient.putFormMultipart(
|
|
@@ -171,9 +175,15 @@ export class ManageAudienceBlobClient {
|
|
|
171
175
|
uploadDescription?: string,
|
|
172
176
|
): Promise<Types.ApiResponseType<CreateAudienceGroupResponse>> {
|
|
173
177
|
const form = new FormData();
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
178
|
+
if (description !== undefined) {
|
|
179
|
+
form.append("description", String(description));
|
|
180
|
+
}
|
|
181
|
+
if (isIfaAudience !== undefined) {
|
|
182
|
+
form.append("isIfaAudience", String(isIfaAudience));
|
|
183
|
+
}
|
|
184
|
+
if (uploadDescription !== undefined) {
|
|
185
|
+
form.append("uploadDescription", String(uploadDescription));
|
|
186
|
+
}
|
|
177
187
|
form.append("file", file); // file
|
|
178
188
|
|
|
179
189
|
const res = await this.httpClient.postFormMultipart(
|
|
@@ -143,6 +143,11 @@ model/numberOfMessagesResponse.ts
|
|
|
143
143
|
model/operatorDemographicFilter.ts
|
|
144
144
|
model/operatorRecipient.ts
|
|
145
145
|
model/pnpMessagesRequest.ts
|
|
146
|
+
model/pnpTemplatedButton.ts
|
|
147
|
+
model/pnpTemplatedEmphasizedItem.ts
|
|
148
|
+
model/pnpTemplatedItem.ts
|
|
149
|
+
model/pnpTemplatedMessageBody.ts
|
|
150
|
+
model/pnpTemplatedMessageRequest.ts
|
|
146
151
|
model/postbackAction.ts
|
|
147
152
|
model/pushMessageRequest.ts
|
|
148
153
|
model/pushMessageResponse.ts
|
|
@@ -39,6 +39,7 @@ import { NarrowcastProgressResponse } from "../model/narrowcastProgressResponse.
|
|
|
39
39
|
import { NarrowcastRequest } from "../model/narrowcastRequest.js";
|
|
40
40
|
import { NumberOfMessagesResponse } from "../model/numberOfMessagesResponse.js";
|
|
41
41
|
import { PnpMessagesRequest } from "../model/pnpMessagesRequest.js";
|
|
42
|
+
import { PnpTemplatedMessageRequest } from "../model/pnpTemplatedMessageRequest.js";
|
|
42
43
|
import { PushMessageRequest } from "../model/pushMessageRequest.js";
|
|
43
44
|
import { PushMessageResponse } from "../model/pushMessageResponse.js";
|
|
44
45
|
import { QuotaConsumptionResponse } from "../model/quotaConsumptionResponse.js";
|
|
@@ -1153,6 +1154,43 @@ export class MessagingApiClient {
|
|
|
1153
1154
|
const parsedBody = text ? JSON.parse(text) : null;
|
|
1154
1155
|
return { httpResponse: res, body: parsedBody };
|
|
1155
1156
|
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Get number of sent LINE notification messages (template)
|
|
1159
|
+
* Calls `GET https://api.line.me/v2/bot/message/delivery/pnp/templated`.
|
|
1160
|
+
* To inspect the HTTP status code or response headers, use {@link getPNPTemplatedMessageStatisticsWithHttpInfo}.
|
|
1161
|
+
* @param date Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1162
|
+
* @returns A promise resolving to the response body.
|
|
1163
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template">LINE Developers documentation</a>
|
|
1164
|
+
*/
|
|
1165
|
+
public async getPNPTemplatedMessageStatistics(
|
|
1166
|
+
date: string,
|
|
1167
|
+
): Promise<NumberOfMessagesResponse> {
|
|
1168
|
+
return (await this.getPNPTemplatedMessageStatisticsWithHttpInfo(date)).body;
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
/**
|
|
1172
|
+
* Get number of sent LINE notification messages (template)
|
|
1173
|
+
* Calls `GET https://api.line.me/v2/bot/message/delivery/pnp/templated`.
|
|
1174
|
+
* This method returns the response body together with the underlying `httpResponse`.
|
|
1175
|
+
* @param date Date the message was sent Format: `yyyyMMdd` (Example:`20211231`) Time zone: UTC+9
|
|
1176
|
+
* @returns A promise resolving to the response body together with the underlying `httpResponse`.
|
|
1177
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#get-number-of-sent-line-notification-messages-template">LINE Developers documentation</a>
|
|
1178
|
+
*/
|
|
1179
|
+
public async getPNPTemplatedMessageStatisticsWithHttpInfo(
|
|
1180
|
+
date: string,
|
|
1181
|
+
): Promise<Types.ApiResponseType<NumberOfMessagesResponse>> {
|
|
1182
|
+
const queryParams = {
|
|
1183
|
+
date: date,
|
|
1184
|
+
};
|
|
1185
|
+
|
|
1186
|
+
const res = await this.httpClient.get(
|
|
1187
|
+
"/v2/bot/message/delivery/pnp/templated",
|
|
1188
|
+
queryParams,
|
|
1189
|
+
);
|
|
1190
|
+
const text = await res.text();
|
|
1191
|
+
const parsedBody = text ? JSON.parse(text) : null;
|
|
1192
|
+
return { httpResponse: res, body: parsedBody };
|
|
1193
|
+
}
|
|
1156
1194
|
/**
|
|
1157
1195
|
* Get profile
|
|
1158
1196
|
* Calls `GET https://api.line.me/v2/bot/profile/{userId}`.
|
|
@@ -2011,6 +2049,57 @@ export class MessagingApiClient {
|
|
|
2011
2049
|
const parsedBody = text ? JSON.parse(text) : null;
|
|
2012
2050
|
return { httpResponse: res, body: parsedBody };
|
|
2013
2051
|
}
|
|
2052
|
+
/**
|
|
2053
|
+
* Send LINE notification message (template)
|
|
2054
|
+
* Calls `POST https://api.line.me/v2/bot/message/pnp/templated/push`.
|
|
2055
|
+
* To inspect the HTTP status code or response headers, use {@link pushTemplatedMessagesByPhoneWithHttpInfo}.
|
|
2056
|
+
* @param pnpTemplatedMessageRequest
|
|
2057
|
+
* @param xLineDeliveryTag String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
2058
|
+
* @returns A promise resolving to the response body.
|
|
2059
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">LINE Developers documentation</a>
|
|
2060
|
+
*/
|
|
2061
|
+
public async pushTemplatedMessagesByPhone(
|
|
2062
|
+
pnpTemplatedMessageRequest: PnpTemplatedMessageRequest,
|
|
2063
|
+
xLineDeliveryTag?: string,
|
|
2064
|
+
): Promise<Types.MessageAPIResponseBase> {
|
|
2065
|
+
return (
|
|
2066
|
+
await this.pushTemplatedMessagesByPhoneWithHttpInfo(
|
|
2067
|
+
pnpTemplatedMessageRequest,
|
|
2068
|
+
xLineDeliveryTag,
|
|
2069
|
+
)
|
|
2070
|
+
).body;
|
|
2071
|
+
}
|
|
2072
|
+
|
|
2073
|
+
/**
|
|
2074
|
+
* Send LINE notification message (template)
|
|
2075
|
+
* Calls `POST https://api.line.me/v2/bot/message/pnp/templated/push`.
|
|
2076
|
+
* This method returns the response body together with the underlying `httpResponse`.
|
|
2077
|
+
* @param pnpTemplatedMessageRequest
|
|
2078
|
+
* @param xLineDeliveryTag String returned in the delivery.data property of the delivery completion event via Webhook.
|
|
2079
|
+
* @returns A promise resolving to the response body together with the underlying `httpResponse`.
|
|
2080
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">LINE Developers documentation</a>
|
|
2081
|
+
*/
|
|
2082
|
+
public async pushTemplatedMessagesByPhoneWithHttpInfo(
|
|
2083
|
+
pnpTemplatedMessageRequest: PnpTemplatedMessageRequest,
|
|
2084
|
+
xLineDeliveryTag?: string,
|
|
2085
|
+
): Promise<Types.ApiResponseType<Types.MessageAPIResponseBase>> {
|
|
2086
|
+
const params = pnpTemplatedMessageRequest;
|
|
2087
|
+
|
|
2088
|
+
const headerParams = {
|
|
2089
|
+
...(xLineDeliveryTag != null
|
|
2090
|
+
? { "X-Line-Delivery-Tag": xLineDeliveryTag }
|
|
2091
|
+
: {}),
|
|
2092
|
+
};
|
|
2093
|
+
|
|
2094
|
+
const res = await this.httpClient.post(
|
|
2095
|
+
"/v2/bot/message/pnp/templated/push",
|
|
2096
|
+
params,
|
|
2097
|
+
{ headers: headerParams },
|
|
2098
|
+
);
|
|
2099
|
+
const text = await res.text();
|
|
2100
|
+
const parsedBody = text ? JSON.parse(text) : null;
|
|
2101
|
+
return { httpResponse: res, body: parsedBody };
|
|
2102
|
+
}
|
|
2014
2103
|
/**
|
|
2015
2104
|
* Send reply message
|
|
2016
2105
|
* Calls `POST https://api.line.me/v2/bot/message/reply`.
|
|
@@ -137,6 +137,11 @@ export * from "./numberOfMessagesResponse.js";
|
|
|
137
137
|
export * from "./operatorDemographicFilter.js";
|
|
138
138
|
export * from "./operatorRecipient.js";
|
|
139
139
|
export * from "./pnpMessagesRequest.js";
|
|
140
|
+
export * from "./pnpTemplatedButton.js";
|
|
141
|
+
export * from "./pnpTemplatedEmphasizedItem.js";
|
|
142
|
+
export * from "./pnpTemplatedItem.js";
|
|
143
|
+
export * from "./pnpTemplatedMessageBody.js";
|
|
144
|
+
export * from "./pnpTemplatedMessageRequest.js";
|
|
140
145
|
export * from "./postbackAction.js";
|
|
141
146
|
export * from "./pushMessageRequest.js";
|
|
142
147
|
export * from "./pushMessageResponse.js";
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-buttons">https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-buttons</a>
|
|
15
|
+
*/
|
|
16
|
+
export type PnpTemplatedButton = {
|
|
17
|
+
/**
|
|
18
|
+
* Specify the key of the button you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#buttons
|
|
19
|
+
*/
|
|
20
|
+
buttonKey: string;
|
|
21
|
+
/**
|
|
22
|
+
* URL of the page to be opened when the user presses the button.
|
|
23
|
+
* Maximum length: 1000
|
|
24
|
+
*/
|
|
25
|
+
url: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
* Item to emphasize in the message.
|
|
15
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items">https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items</a>
|
|
16
|
+
*/
|
|
17
|
+
export type PnpTemplatedEmphasizedItem = {
|
|
18
|
+
/**
|
|
19
|
+
* Specify the key of the item you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items
|
|
20
|
+
*/
|
|
21
|
+
itemKey: string;
|
|
22
|
+
/**
|
|
23
|
+
* String to be displayed as the value of the item.
|
|
24
|
+
* Maximum length: 15
|
|
25
|
+
*/
|
|
26
|
+
content: string;
|
|
27
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items">https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template-items</a>
|
|
15
|
+
*/
|
|
16
|
+
export type PnpTemplatedItem = {
|
|
17
|
+
/**
|
|
18
|
+
* Specify the key of the item you want to include. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#items
|
|
19
|
+
*/
|
|
20
|
+
itemKey: string;
|
|
21
|
+
/**
|
|
22
|
+
* String to be displayed as the value of the item.
|
|
23
|
+
* Maximum length: 300
|
|
24
|
+
*/
|
|
25
|
+
content: string;
|
|
26
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { PnpTemplatedButton } from "./pnpTemplatedButton.js";
|
|
14
|
+
import { PnpTemplatedEmphasizedItem } from "./pnpTemplatedEmphasizedItem.js";
|
|
15
|
+
import { PnpTemplatedItem } from "./pnpTemplatedItem.js";
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* The body object of the template you want to send. You can't specify the same item more than once in a single message.
|
|
19
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template</a>
|
|
20
|
+
*/
|
|
21
|
+
export type PnpTemplatedMessageBody = {
|
|
22
|
+
emphasizedItem?: PnpTemplatedEmphasizedItem;
|
|
23
|
+
/**
|
|
24
|
+
* Array of items to include in the message. The `itemKey` must be unique across `emphasizedItem` and `items`.
|
|
25
|
+
* Maximum items: 15
|
|
26
|
+
*/
|
|
27
|
+
items?: Array<PnpTemplatedItem>;
|
|
28
|
+
/**
|
|
29
|
+
* Array of buttons to include in the message. The `buttonKey` must be unique.
|
|
30
|
+
* Maximum items: 2
|
|
31
|
+
*/
|
|
32
|
+
buttons?: Array<PnpTemplatedButton>;
|
|
33
|
+
};
|
|
@@ -0,0 +1,33 @@
|
|
|
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 { PnpTemplatedMessageBody } from "./pnpTemplatedMessageBody.js";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @see <a href="https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template">https://developers.line.biz/en/reference/line-notification-messages/#send-line-notification-message-template</a>
|
|
17
|
+
*/
|
|
18
|
+
export type PnpTemplatedMessageRequest = {
|
|
19
|
+
/**
|
|
20
|
+
* Message destination. Specify a phone number that has been normalized to E.164 format and hashed with SHA256.
|
|
21
|
+
*/
|
|
22
|
+
to: string;
|
|
23
|
+
/**
|
|
24
|
+
* Specify the key of the template you want to send. For available keys, see https://developers.line.biz/en/docs/partner-docs/line-notification-messages/template/#templates
|
|
25
|
+
*/
|
|
26
|
+
templateKey: string;
|
|
27
|
+
body?: PnpTemplatedMessageBody;
|
|
28
|
+
/**
|
|
29
|
+
* Name of aggregation unit. Case-sensitive. For more information about assigning a unit name, see https://developers.line.biz/en/docs/messaging-api/unit-based-statistics-aggregation/#assign-names-to-units-when-sending-messages
|
|
30
|
+
* Maximum items: 1
|
|
31
|
+
*/
|
|
32
|
+
customAggregationUnits?: Array<string>;
|
|
33
|
+
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const LINE_BOT_SDK_VERSION = "11.
|
|
1
|
+
const LINE_BOT_SDK_VERSION = "11.3.0";
|
|
2
2
|
export const USER_AGENT = `@line/bot-sdk/${LINE_BOT_SDK_VERSION}`;
|
|
@@ -8,8 +8,8 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v24.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Thu, 01 Oct 2026 22:35:12 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
15
|
-
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [
|
|
15
|
+
These definitions were written by [Microsoft TypeScript](https://github.com/Microsoft), [Alberto Schiabel](https://github.com/jkomyno), [Andrew Makarov](https://github.com/r3nya), [Benjamin Toueg](https://github.com/btoueg), [David Junger](https://github.com/touffy), [Mohsen Azimi](https://github.com/mohsen1), [Nikita Galkin](https://github.com/galkin), [Sebastian Silbermann](https://github.com/eps1lon), [Wilco Bakker](https://github.com/WilcoBakker), [Trivikram Kamat](https://github.com/trivikr), [Junxiao Shi](https://github.com/yoursunny), [ExE Boss](https://github.com/ExE-Boss), [Piotr Błażejewicz](https://github.com/peterblazejewicz), [Anna Henningsen](https://github.com/addaleax), [NodeJS Contributors](https://github.com/NodeJS), [Linus Unnebäck](https://github.com/LinusU), [wafuwafu13](https://github.com/wafuwafu13), [Matteo Collina](https://github.com/mcollina), [Dmitry Semigradsky](https://github.com/Semigradsky), [René](https://github.com/Renegade334), and [Yagiz Nizipli](https://github.com/anonrig).
|
|
@@ -123,37 +123,31 @@ declare module "async_hooks" {
|
|
|
123
123
|
function triggerAsyncId(): number;
|
|
124
124
|
interface HookCallbacks {
|
|
125
125
|
/**
|
|
126
|
-
*
|
|
127
|
-
* @param asyncId A unique ID for the async resource
|
|
128
|
-
* @param type The type of the async resource
|
|
129
|
-
* @param triggerAsyncId The unique ID of the async resource in whose execution context this async resource was created
|
|
130
|
-
* @param resource Reference to the resource representing the async operation, needs to be released during destroy
|
|
126
|
+
* The [`init` callback](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#initasyncid-type-triggerasyncid-resource).
|
|
131
127
|
*/
|
|
132
128
|
init?(asyncId: number, type: string, triggerAsyncId: number, resource: object): void;
|
|
133
129
|
/**
|
|
134
|
-
*
|
|
135
|
-
* The before callback is called just before said callback is executed.
|
|
136
|
-
* @param asyncId the unique identifier assigned to the resource about to execute the callback.
|
|
130
|
+
* The [`before` callback](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#beforeasyncid).
|
|
137
131
|
*/
|
|
138
132
|
before?(asyncId: number): void;
|
|
139
133
|
/**
|
|
140
|
-
*
|
|
141
|
-
*
|
|
142
|
-
* If an uncaught exception occurs during execution of the callback, then `after` will run after the `'uncaughtException'` event is emitted or a `domain`'s handler runs.
|
|
143
|
-
* @param asyncId the unique identifier assigned to the resource which has executed the callback.
|
|
134
|
+
* The [`after` callback](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#afterasyncid).
|
|
144
135
|
*/
|
|
145
136
|
after?(asyncId: number): void;
|
|
146
137
|
/**
|
|
147
|
-
*
|
|
148
|
-
* as the promise itself.
|
|
149
|
-
* @param asyncId the unique id for the promise that was resolve()d.
|
|
138
|
+
* The [`promiseResolve` callback](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#promiseresolveasyncid).
|
|
150
139
|
*/
|
|
151
140
|
promiseResolve?(asyncId: number): void;
|
|
152
141
|
/**
|
|
153
|
-
*
|
|
154
|
-
* @param asyncId a unique ID for the async resource
|
|
142
|
+
* The [`destroy` callback](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#destroyasyncid).
|
|
155
143
|
*/
|
|
156
144
|
destroy?(asyncId: number): void;
|
|
145
|
+
/**
|
|
146
|
+
* Whether the hook should track `Promise`s. Cannot be `false` if
|
|
147
|
+
* `promiseResolve` is set.
|
|
148
|
+
* @default true
|
|
149
|
+
*/
|
|
150
|
+
trackPromises?: boolean | undefined;
|
|
157
151
|
}
|
|
158
152
|
interface AsyncHook {
|
|
159
153
|
/**
|
|
@@ -174,7 +168,8 @@ declare module "async_hooks" {
|
|
|
174
168
|
*
|
|
175
169
|
* All callbacks are optional. For example, if only resource cleanup needs to
|
|
176
170
|
* be tracked, then only the `destroy` callback needs to be passed. The
|
|
177
|
-
* specifics of all functions that can be passed to `callbacks` is in the
|
|
171
|
+
* specifics of all functions that can be passed to `callbacks` is in the
|
|
172
|
+
* [Hook Callbacks](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#hook-callbacks) section.
|
|
178
173
|
*
|
|
179
174
|
* ```js
|
|
180
175
|
* import { createHook } from 'node:async_hooks';
|
|
@@ -202,12 +197,13 @@ declare module "async_hooks" {
|
|
|
202
197
|
* ```
|
|
203
198
|
*
|
|
204
199
|
* Because promises are asynchronous resources whose lifecycle is tracked
|
|
205
|
-
* via the async hooks mechanism, the `init()`, `before()`, `after()`, and
|
|
200
|
+
* via the async hooks mechanism, the `init()`, `before()`, `after()`, and
|
|
201
|
+
* `destroy()` callbacks _must not_ be async functions that return promises.
|
|
206
202
|
* @since v8.1.0
|
|
207
|
-
* @param
|
|
208
|
-
* @
|
|
203
|
+
* @param options The [Hook Callbacks](https://nodejs.org/docs/latest-v24.x/api/async_hooks.html#hook-callbacks) to register
|
|
204
|
+
* @returns Instance used for disabling and enabling hooks
|
|
209
205
|
*/
|
|
210
|
-
function createHook(
|
|
206
|
+
function createHook(options: HookCallbacks): AsyncHook;
|
|
211
207
|
interface AsyncResourceOptions {
|
|
212
208
|
/**
|
|
213
209
|
* The ID of the execution context that created this async event.
|
|
@@ -316,11 +316,11 @@ declare module "buffer" {
|
|
|
316
316
|
* such `Buffer` instances with zeroes.
|
|
317
317
|
*
|
|
318
318
|
* When using `Buffer.allocUnsafe()` to allocate new `Buffer` instances,
|
|
319
|
-
* allocations
|
|
320
|
-
*
|
|
321
|
-
* individually allocated `Buffer`
|
|
322
|
-
*
|
|
323
|
-
* many individual `ArrayBuffer` objects.
|
|
319
|
+
* allocations less than `Buffer.poolSize >>> 1` (32KiB when default poolSize is used) are sliced
|
|
320
|
+
* from a single pre-allocated `Buffer`. This allows applications to avoid the
|
|
321
|
+
* garbage collection overhead of creating many individually allocated `Buffer`
|
|
322
|
+
* instances. This approach improves both performance and memory usage by
|
|
323
|
+
* eliminating the need to track and clean up as many individual `ArrayBuffer` objects.
|
|
324
324
|
*
|
|
325
325
|
* However, in the case where a developer may need to retain a small chunk of
|
|
326
326
|
* memory from a pool for an indeterminate amount of time, it may be appropriate
|
|
@@ -469,4 +469,9 @@ declare module "buffer" {
|
|
|
469
469
|
new(size: number): Buffer<ArrayBuffer>;
|
|
470
470
|
prototype: Buffer;
|
|
471
471
|
};
|
|
472
|
+
/**
|
|
473
|
+
* @deprecated This is intended for internal use, and will be removed once `@types/node` no longer supports
|
|
474
|
+
* TypeScript versions earlier than 5.7.
|
|
475
|
+
*/
|
|
476
|
+
type BufferView<T extends NodeJS.ArrayBufferView> = T extends NodeJS.ArrayBufferView<infer B> ? Buffer<B> : never;
|
|
472
477
|
}
|
|
@@ -204,6 +204,13 @@ declare module "buffer" {
|
|
|
204
204
|
* @since v16.7.0
|
|
205
205
|
*/
|
|
206
206
|
stream(): WebReadableStream;
|
|
207
|
+
/**
|
|
208
|
+
* Returns a new `ReadableStream` that allows the content of the `Blob` to be read
|
|
209
|
+
* as a stream of UTF-8 decoded strings. It is equivalent to piping
|
|
210
|
+
* `blob.stream()` through a `TextDecoderStream` set up with UTF-8.
|
|
211
|
+
* @since v24.19.0
|
|
212
|
+
*/
|
|
213
|
+
textStream(): WebReadableStream<string>;
|
|
207
214
|
}
|
|
208
215
|
export interface FileOptions {
|
|
209
216
|
/**
|
|
@@ -220,6 +220,11 @@ declare module "child_process" {
|
|
|
220
220
|
/**
|
|
221
221
|
* The `subprocess.exitCode` property indicates the exit code of the child process.
|
|
222
222
|
* If the child process is still running, the field will be `null`.
|
|
223
|
+
*
|
|
224
|
+
* When the child process is terminated by a signal, `subprocess.exitCode` will be
|
|
225
|
+
* `null` and `subprocess.signalCode` will be set. To get the corresponding
|
|
226
|
+
* POSIX exit code, use
|
|
227
|
+
* `util.convertProcessSignalToExitCode(subprocess.signalCode)`.
|
|
223
228
|
*/
|
|
224
229
|
readonly exitCode: number | null;
|
|
225
230
|
/**
|
|
@@ -281,7 +286,6 @@ declare module "child_process" {
|
|
|
281
286
|
* new process in a shell or with the use of the `shell` option of `ChildProcess`:
|
|
282
287
|
*
|
|
283
288
|
* ```js
|
|
284
|
-
* 'use strict';
|
|
285
289
|
* import { spawn } from 'node:child_process';
|
|
286
290
|
*
|
|
287
291
|
* const subprocess = spawn(
|