Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Oct 29, 2025

Adds bilingual (English/Japanese) JSDoc documentation for the setReceiveHandler method in the firehose package, along with comprehensive API documentation in the docs directory.

Changes

  • Added JSDoc with bilingual description explaining the method transforms incoming WebSocket messages before pubsub publication
  • Documented handler parameter requirements: must return RequestData with topic and body properties
  • Included usage example showing message transformation pattern
  • Added Japanese API documentation for setReceiveHandler() in docs/src/content/docs/ja/api/firehose.md (English documentation already existed)

JSDoc added to source code:

/**
 * Sets a custom handler for transforming incoming WebSocket messages.
 *
 * WebSocketから受信したメッセージを変換するカスタムハンドラーを設定します。
 *
 * @param handler - A function that transforms incoming data into the required RequestData format.
 *                  The handler receives the raw data from the WebSocket client and must return
 *                  an object with `topic` (string) and `body` (record) properties.
 *                  Can be synchronous or asynchronous.
 *
 *                  WebSocketクライアントから受信した生データを受け取り、
 *                  `topic`(文字列)と`body`(レコード)プロパティを持つオブジェクトを
 *                  返す必要がある変換関数です。同期・非同期のどちらでも可能です。
 *
 * @example
 * ```typescript
 * firehose.setReceiveHandler((data) => {
 *   return {
 *     topic: data.channel as string,
 *     body: { message: data.content }
 *   };
 * });
 * ```
 */

API documentation now includes:

Original prompt

This section details on the original issue you should resolve

<issue_title>firehoseのsetReceiveHandler関数のドキュメントを追加する</issue_title>
<issue_description></issue_description>

<agent_instructions>日本語と英語の両方に対してのドキュメントを書いて。</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Oct 29, 2025

⚠️ No Changeset found

Latest commit: 394faa7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link

vercel bot commented Oct 29, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
aikyo Ready Ready Preview Comment Oct 29, 2025 10:00am

@coderabbitai
Copy link

coderabbitai bot commented Oct 29, 2025

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI changed the title [WIP] Add documentation for firehose setReceiveHandler function Add JSDoc documentation for Firehose.setReceiveHandler Oct 29, 2025
Copilot AI requested a review from akazdayo October 29, 2025 06:47
@akazdayo
Copy link
Collaborator

@copilot docs/のfirehoseにもドキュメントを追加して。英語と日本語両方

Copy link
Contributor Author

Copilot AI commented Oct 29, 2025

@copilot docs/のfirehoseにもドキュメントを追加して。英語と日本語両方

Added setReceiveHandler documentation to the Japanese firehose docs at docs/src/content/docs/ja/api/firehose.md. The English documentation already had this section. (commit 394faa7)

Copilot AI changed the title Add JSDoc documentation for Firehose.setReceiveHandler Add JSDoc and API documentation for Firehose.setReceiveHandler Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

firehoseのsetReceiveHandler関数のドキュメントを追加する

2 participants