@hello-bill/node 2.2.0-beta.3 → 2.2.0-beta.5

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 (42) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/express/index.d.cts +3 -2
  3. package/dist/express/index.d.ts +3 -2
  4. package/dist/express/index.js +18 -0
  5. package/dist/express/index.js.map +1 -1
  6. package/dist/express/index.mjs +18 -0
  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 +17 -0
  11. package/dist/hono/index.js.map +1 -1
  12. package/dist/hono/index.mjs +17 -0
  13. package/dist/hono/index.mjs.map +1 -1
  14. package/dist/{index-weK_H8io.d.cts → index-D1Y88dmC.d.cts} +12 -1
  15. package/dist/{index-CtQgDuFR.d.ts → index-sSyUfAhM.d.ts} +12 -1
  16. package/dist/index.d.cts +4 -4
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +17 -0
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +17 -0
  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 +17 -0
  25. package/dist/koa/index.js.map +1 -1
  26. package/dist/koa/index.mjs +17 -0
  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 +17 -0
  31. package/dist/next/index.js.map +1 -1
  32. package/dist/next/index.mjs +17 -0
  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/types/index.js.map +1 -1
  37. package/dist/types/index.mjs.map +1 -1
  38. package/dist/webhook/index.d.cts +2 -2
  39. package/dist/webhook/index.d.ts +2 -2
  40. package/dist/{webhooks-iwkEPw9n.d.cts → webhooks-CfpQ4PEE.d.cts} +9 -0
  41. package/dist/{webhooks-iwkEPw9n.d.ts → webhooks-CfpQ4PEE.d.ts} +9 -0
  42. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.0-beta.4
4
+
3
5
  ## 2.2.0-beta.2
4
6
 
5
7
  ## 2.2.0-beta.1
@@ -1,5 +1,5 @@
1
- import { C as CreateHellobillHandlerOptions } from '../index-weK_H8io.cjs';
2
- import '../webhooks-iwkEPw9n.cjs';
1
+ import { C as CreateHellobillHandlerOptions } from '../index-D1Y88dmC.cjs';
2
+ import '../webhooks-CfpQ4PEE.cjs';
3
3
 
4
4
  /**
5
5
  * Express adapter for the framework-agnostic SDK core.
@@ -17,6 +17,7 @@ type AnyRouter = any;
17
17
  * Creates an Express Router that mounts the HelloBill endpoints:
18
18
  * POST /webhooks (optional — only when opts.webhook is provided)
19
19
  * POST /session
20
+ * POST /session/:id/resume
20
21
  * GET /loa
21
22
  * POST /customers
22
23
  * GET /status
@@ -1,5 +1,5 @@
1
- import { C as CreateHellobillHandlerOptions } from '../index-CtQgDuFR.js';
2
- import '../webhooks-iwkEPw9n.js';
1
+ import { C as CreateHellobillHandlerOptions } from '../index-sSyUfAhM.js';
2
+ import '../webhooks-CfpQ4PEE.js';
3
3
 
4
4
  /**
5
5
  * Express adapter for the framework-agnostic SDK core.
@@ -17,6 +17,7 @@ type AnyRouter = any;
17
17
  * Creates an Express Router that mounts the HelloBill endpoints:
18
18
  * POST /webhooks (optional — only when opts.webhook is provided)
19
19
  * POST /session
20
+ * POST /session/:id/resume
20
21
  * GET /loa
21
22
  * POST /customers
22
23
  * GET /status
@@ -895,6 +895,22 @@ function createHellobillHandler(opts) {
895
895
  if (!result2) return;
896
896
  passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
897
897
  };
898
+ const sessionResume = async (req, res) => {
899
+ const id = typeof req.params?.id === "string" ? req.params.id : void 0;
900
+ if (!id || id.length === 0) {
901
+ sendError(res, 400, "validation.missing_required_field", "sessions/:id/resume requires a non-empty id path param");
902
+ return;
903
+ }
904
+ const result2 = await safeCallUpstream(res, {
905
+ method: "POST",
906
+ path: `/partner/sessions/${encodeURIComponent(id)}/resume`,
907
+ body: req.body,
908
+ idempotencyKey: inboundIdempotencyKey(req) ?? idempotencyKeyFactory(),
909
+ logger
910
+ });
911
+ if (!result2) return;
912
+ passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
913
+ };
898
914
  const savingsSummary = async (req, res) => {
899
915
  const rawCustomer = req.query.customer_id ?? req.params?.id;
900
916
  const customerId = Array.isArray(rawCustomer) ? rawCustomer[0] : rawCustomer;
@@ -965,6 +981,7 @@ function createHellobillHandler(opts) {
965
981
  products,
966
982
  property,
967
983
  sessions: { list: sessionsList, get: sessionsGet },
984
+ sessionResume,
968
985
  savingsSummary,
969
986
  serviceSlots,
970
987
  loaDocument
@@ -1047,6 +1064,7 @@ function createHellobillRouter(opts) {
1047
1064
  }
1048
1065
  router.use(express.json({ limit: "1mb" }));
1049
1066
  router.post("/session", asyncWrap(handlers.session));
1067
+ router.post("/session/:id/resume", asyncWrap(handlers.sessionResume));
1050
1068
  router.get("/loa", asyncWrap(handlers.loa));
1051
1069
  router.post("/bank-details", asyncWrap(handlers.bankDetails.submit));
1052
1070
  router.get("/bank-details", asyncWrap(handlers.bankDetails.get));