Repository navigation
@hibira-io/node 0.1.0: Chat API, Live Chat verified visitors, Approvals - #1
Merged
Merged
Conversation
A dependency-free server SDK for the products the pusher package does not cover: the Chat API client, Live Chat user hash/identity/script tag with Express, Koa and Fastify middleware, and the hosted Approvals API with callback verification. CI on Node 18-24 and npm publish on release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SHtsCCKScUUX9khSrU2wij
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Danny · project thread
Summary
The first version of
@hibira-io/node, a dependency-free Node.js server SDK. It covers the products thepusherpackage doesn't:hibira.chat): conversations, members, messages, read receipts, system messages, a user's conversations, plusrequest()for any other route. Requests are signed with auth_version 1.0, so they work with PUT and DELETE.liveChatUserHash,liveChatIdentityandliveChatScriptTag(HTML-escaped, with CSP nonce support).{ identity, scriptTag }on the request.hibira.approvals):request,get(wait capped at 25 s),waitandreply.verifyCallback/verifyApprovalCallbackforHibira-Signaturecallbacks. This uses the same algorithm as the Go module.NPM_TOKENadded for this repo, and the tag must match the package version.Notes:
mainwas empty, so it now holds a single LICENSE-only commit as the base for this PR.pusher, and waiting rooms by@hibira-io/waiting-room.Test plan
npm test: 11 tests pass. They run against a local HTTP server and check the method, path encoding, JSON body, HMAC signature, body_md5, error mapping, callback signature/timestamp and middleware output.npm run buildandnpm pack --dry-runGenerated by Claude Code