@hello-bill/node 2.1.1-beta.6 → 2.1.1-beta.7
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/CHANGELOG.md +21 -24
- package/dist/express/index.d.cts +2 -2
- package/dist/express/index.d.ts +2 -2
- package/dist/express/index.js +1 -20
- package/dist/express/index.js.map +1 -1
- package/dist/express/index.mjs +1 -20
- package/dist/express/index.mjs.map +1 -1
- package/dist/hono/index.d.cts +2 -2
- package/dist/hono/index.d.ts +2 -2
- package/dist/hono/index.js +1 -20
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/index.mjs +1 -20
- package/dist/hono/index.mjs.map +1 -1
- package/dist/{index-BAETgMms.d.ts → index-D5WlUYVZ.d.cts} +1 -7
- package/dist/{index-9PkSdjVq.d.cts → index-jK9cEnEY.d.ts} +1 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -17
- package/dist/index.mjs.map +1 -1
- package/dist/koa/index.d.cts +2 -2
- package/dist/koa/index.d.ts +2 -2
- package/dist/koa/index.js +1 -20
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/index.mjs +1 -20
- package/dist/koa/index.mjs.map +1 -1
- package/dist/next/index.d.cts +2 -2
- package/dist/next/index.d.ts +2 -2
- package/dist/next/index.js +1 -23
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +1 -23
- package/dist/next/index.mjs.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/webhook/index.d.cts +2 -2
- package/dist/webhook/index.d.ts +2 -2
- package/dist/{webhooks-Cv4e8oXp.d.cts → webhooks-DePW-Bjp.d.cts} +16 -1
- package/dist/{webhooks-Cv4e8oXp.d.ts → webhooks-DePW-Bjp.d.ts} +16 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,38 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 2.1.
|
|
4
|
-
|
|
5
|
-
## 2.1.1-beta.5
|
|
6
|
-
|
|
7
|
-
## 2.1.1-beta.4
|
|
8
|
-
|
|
9
|
-
## 2.1.1-beta.3
|
|
10
|
-
|
|
11
|
-
## 2.1.1-beta.2
|
|
3
|
+
## 2.1.0-beta.0
|
|
12
4
|
|
|
13
|
-
|
|
5
|
+
### Minor Changes
|
|
14
6
|
|
|
15
|
-
|
|
7
|
+
- 3dc28b1: # 1.1.0 — Stage A: HelloBill v1.15 Partner SDK
|
|
16
8
|
|
|
17
|
-
|
|
9
|
+
Initial scope-canonical release of the `@hello-bill/{node,sdk}` packages under The-Bunch ownership. Minor bump because T#8 + T#9 added new public-API surfaces (5 framework adapters + Direct API client). Bumps past the prior `1.0.0` versions (published 2026-05-14 by the previous maintainer).
|
|
18
10
|
|
|
19
|
-
##
|
|
11
|
+
## `@hello-bill/node`
|
|
20
12
|
|
|
21
|
-
|
|
13
|
+
- **Type-delta refresh** to v1.15 Partner API: structured `ProductSetup.details`, required `WebhookEnvelope.context: ContextEntry[]`, required-nullable `referral_id`, masked `BankDetailsObject`, narrowed `SetupStatusChanged.previous_status`, `SelectedProduct.location` server-derived per spec §16.
|
|
14
|
+
- **Session middleware** — `createHellobillRouter` for express; `sessions.list` + `sessions.get` proxies; inbound `Idempotency-Key` plumbing; 5-header passthrough allowlist (`Retry-After`, `X-RateLimit-*`); full upstream session JSON forwarded; optional `partnerSession` CSRF resolver per spec §19:3478.
|
|
15
|
+
- **Webhook receiver** — `createWebhookHandler` with HMAC-SHA256 over raw bytes, pluggable `WebhookDedupeStore`, exhaustive 12-variant dispatcher with compile-time `assertNever`; `verifyWebhookSignature` boolean wrapper alongside the throwing `verifyWebhook`.
|
|
16
|
+
- **Framework adapters** (new) — `@hello-bill/node/{hono,koa,next}` with lazy peer-dependency loading.
|
|
17
|
+
- **Direct API client** (new) — `HelloBillPartner` class with `.sessions.{create,list,get,products,property,loa,customers}`, `.customers.status`, `.bankDetails.{submit,get}` — server-to-server alternative to the embed. Shares `TokenManager` with the middleware.
|
|
18
|
+
- **`HellobillApiError.headers`** — typed errors now expose upstream response headers so partners can read `Retry-After` (425) and `X-RateLimit-*` (429).
|
|
22
19
|
|
|
23
|
-
|
|
24
|
-
SDK middleware client now calls short, baseEndpoint-relative paths
|
|
25
|
-
(`/service-slots`, `/savings-summary`, `/loa-document`) consistent with the
|
|
26
|
-
other routes, and the node SDK mounts those three routes on all four framework
|
|
27
|
-
adapters (express, hono, koa, next), with a new `loaDocument` proxy handler.
|
|
28
|
-
Previously the SDK called full upstream paths the node middleware never served,
|
|
29
|
-
so service-slots, savings-summary, and loa-document bridge calls 404'd.
|
|
20
|
+
## `@hello-bill/sdk`
|
|
30
21
|
|
|
31
|
-
|
|
22
|
+
- **Architecture pivot Shadow-DOM → iframe + postMessage** per spec §9.5.9: parent SDK now creates an iframe at `embed.hellobill.app/v1/onboard?token={session_token}`, handles a 27-variant postMessage envelope, FIFO outbound queue (cap 50, drop-oldest), synchronous origin verification, thenable proxy supporting both sync `HelloBill.init({...})` and `await HelloBill.init({...})` patterns.
|
|
23
|
+
- **Operational events** — `hb:resize` (parent applies to iframe height) and `hb:navigate` (default `window.open(url, '_blank', 'noopener')`).
|
|
24
|
+
- **`HelloBillEmbed` export alias** matching spec §9.3:1871 / embed HTML L1972.
|
|
25
|
+
- **`OnCloseReason` literal union** narrowed to `'user_dismissed' | 'timeout' | 'error'` per spec §16.
|
|
26
|
+
- **`mapGoodlordToSessionData` + `GoodlordTenancy`** integration helpers + **`buildNoJsFallbackUrl`** helper for no-JS partner fallbacks.
|
|
27
|
+
- **React + Vue widgets** (new) — `@hello-bill/sdk/{react,vue}` `HelloBillWidget` components with lifecycle-bound init/destroy.
|
|
32
28
|
|
|
33
|
-
##
|
|
29
|
+
## Notes
|
|
34
30
|
|
|
35
|
-
|
|
31
|
+
- Iframe content (the 19-screen embed UX) does NOT ship in this release — it deploys separately to `embed.hellobill.app/v1/onboard` in Stage B. Partners can install the SDK at v1.1.0; the iframe will be live once Stage B ships.
|
|
32
|
+
- Direct API client (`@hello-bill/node` `HelloBillPartner`) is fully functional in v1.1.0 — does not depend on Stage B.
|
|
36
33
|
|
|
37
34
|
All notable changes to `@hello-bill/node` will be documented in this file.
|
|
38
35
|
|
package/dist/express/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreateHellobillHandlerOptions } from '../index-
|
|
2
|
-
import '../webhooks-
|
|
1
|
+
import { C as CreateHellobillHandlerOptions } from '../index-D5WlUYVZ.cjs';
|
|
2
|
+
import '../webhooks-DePW-Bjp.cjs';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Express adapter for the framework-agnostic SDK core.
|
package/dist/express/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as CreateHellobillHandlerOptions } from '../index-
|
|
2
|
-
import '../webhooks-
|
|
1
|
+
import { C as CreateHellobillHandlerOptions } from '../index-jK9cEnEY.js';
|
|
2
|
+
import '../webhooks-DePW-Bjp.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Express adapter for the framework-agnostic SDK core.
|
package/dist/express/index.js
CHANGED
|
@@ -932,21 +932,6 @@ function createHellobillHandler(opts) {
|
|
|
932
932
|
if (!result2) return;
|
|
933
933
|
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
934
934
|
};
|
|
935
|
-
const loaDocument = async (req, res) => {
|
|
936
|
-
const rawLoa = req.query.loa_id ?? req.params?.id;
|
|
937
|
-
const loaId = Array.isArray(rawLoa) ? rawLoa[0] : rawLoa;
|
|
938
|
-
if (!loaId) {
|
|
939
|
-
sendError(res, 400, "validation.missing_required_field", "loa_id query parameter required");
|
|
940
|
-
return;
|
|
941
|
-
}
|
|
942
|
-
const result2 = await safeCallUpstream(res, {
|
|
943
|
-
method: "GET",
|
|
944
|
-
path: `/partner/loa/${encodeURIComponent(loaId)}/document`,
|
|
945
|
-
logger
|
|
946
|
-
});
|
|
947
|
-
if (!result2) return;
|
|
948
|
-
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
949
|
-
};
|
|
950
935
|
const webhookHandler = opts.webhook ? createWebhookHandler({ ...opts.webhook, logger: opts.webhook.logger ?? opts.logger }) : void 0;
|
|
951
936
|
const result = {
|
|
952
937
|
session,
|
|
@@ -958,8 +943,7 @@ function createHellobillHandler(opts) {
|
|
|
958
943
|
property,
|
|
959
944
|
sessions: { list: sessionsList, get: sessionsGet },
|
|
960
945
|
savingsSummary,
|
|
961
|
-
serviceSlots
|
|
962
|
-
loaDocument
|
|
946
|
+
serviceSlots
|
|
963
947
|
};
|
|
964
948
|
if (webhookHandler !== void 0) {
|
|
965
949
|
result.webhook = webhookHandler;
|
|
@@ -1048,9 +1032,6 @@ function createHellobillRouter(opts) {
|
|
|
1048
1032
|
router.get("/property", asyncWrap(handlers.property));
|
|
1049
1033
|
router.get("/sessions", asyncWrap(handlers.sessions.list));
|
|
1050
1034
|
router.get("/sessions/:id", asyncWrap(handlers.sessions.get));
|
|
1051
|
-
router.get("/service-slots", asyncWrap(handlers.serviceSlots));
|
|
1052
|
-
router.get("/savings-summary", asyncWrap(handlers.savingsSummary));
|
|
1053
|
-
router.get("/loa-document", asyncWrap(handlers.loaDocument));
|
|
1054
1035
|
router.use(
|
|
1055
1036
|
(err, _req, res, _next) => {
|
|
1056
1037
|
opts.logger?.error?.("hellobill.router_error", { message: err?.message });
|