@hello-bill/node 2.1.1-beta.5 → 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.
Files changed (40) hide show
  1. package/CHANGELOG.md +21 -22
  2. package/dist/express/index.d.cts +2 -2
  3. package/dist/express/index.d.ts +2 -2
  4. package/dist/express/index.js +1 -20
  5. package/dist/express/index.js.map +1 -1
  6. package/dist/express/index.mjs +1 -20
  7. package/dist/express/index.mjs.map +1 -1
  8. package/dist/hono/index.d.cts +2 -2
  9. package/dist/hono/index.d.ts +2 -2
  10. package/dist/hono/index.js +1 -20
  11. package/dist/hono/index.js.map +1 -1
  12. package/dist/hono/index.mjs +1 -20
  13. package/dist/hono/index.mjs.map +1 -1
  14. package/dist/{index-BAETgMms.d.ts → index-D5WlUYVZ.d.cts} +1 -7
  15. package/dist/{index-9PkSdjVq.d.cts → index-jK9cEnEY.d.ts} +1 -7
  16. package/dist/index.d.cts +4 -4
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +1 -17
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +1 -17
  21. package/dist/index.mjs.map +1 -1
  22. package/dist/koa/index.d.cts +2 -2
  23. package/dist/koa/index.d.ts +2 -2
  24. package/dist/koa/index.js +1 -20
  25. package/dist/koa/index.js.map +1 -1
  26. package/dist/koa/index.mjs +1 -20
  27. package/dist/koa/index.mjs.map +1 -1
  28. package/dist/next/index.d.cts +2 -2
  29. package/dist/next/index.d.ts +2 -2
  30. package/dist/next/index.js +1 -23
  31. package/dist/next/index.js.map +1 -1
  32. package/dist/next/index.mjs +1 -23
  33. package/dist/next/index.mjs.map +1 -1
  34. package/dist/types/index.d.cts +2 -2
  35. package/dist/types/index.d.ts +2 -2
  36. package/dist/webhook/index.d.cts +2 -2
  37. package/dist/webhook/index.d.ts +2 -2
  38. package/dist/{webhooks-Cv4e8oXp.d.cts → webhooks-DePW-Bjp.d.cts} +16 -1
  39. package/dist/{webhooks-Cv4e8oXp.d.ts → webhooks-DePW-Bjp.d.ts} +16 -1
  40. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,36 +1,35 @@
1
1
  # Changelog
2
2
 
3
- ## 2.1.1-beta.5
4
-
5
- ## 2.1.1-beta.4
6
-
7
- ## 2.1.1-beta.3
8
-
9
- ## 2.1.1-beta.2
3
+ ## 2.1.0-beta.0
10
4
 
11
- ## 2.1.1-beta.1
5
+ ### Minor Changes
12
6
 
13
- ## 2.1.1-beta.0
7
+ - 3dc28b1: # 1.1.0 — Stage A: HelloBill v1.15 Partner SDK
14
8
 
15
- ## 2.1.0
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).
16
10
 
17
- ## 2.1.0-beta.3
11
+ ## `@hello-bill/node`
18
12
 
19
- ### Patch Changes
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).
20
19
 
21
- - Fix the embed's data-route parity between the SDK and the node middleware. The
22
- SDK middleware client now calls short, baseEndpoint-relative paths
23
- (`/service-slots`, `/savings-summary`, `/loa-document`) consistent with the
24
- other routes, and the node SDK mounts those three routes on all four framework
25
- adapters (express, hono, koa, next), with a new `loaDocument` proxy handler.
26
- Previously the SDK called full upstream paths the node middleware never served,
27
- so service-slots, savings-summary, and loa-document bridge calls 404'd.
20
+ ## `@hello-bill/sdk`
28
21
 
29
- ## 2.1.0-beta.2
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.
30
28
 
31
- ## 2.1.0-beta.1
29
+ ## Notes
32
30
 
33
- ## 2.1.0-beta.0
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.
34
33
 
35
34
  All notable changes to `@hello-bill/node` will be documented in this file.
36
35
 
@@ -1,5 +1,5 @@
1
- import { C as CreateHellobillHandlerOptions } from '../index-9PkSdjVq.cjs';
2
- import '../webhooks-Cv4e8oXp.cjs';
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.
@@ -1,5 +1,5 @@
1
- import { C as CreateHellobillHandlerOptions } from '../index-BAETgMms.js';
2
- import '../webhooks-Cv4e8oXp.js';
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.
@@ -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 });