@hello-bill/node 2.2.0-beta.4 → 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 (41) hide show
  1. package/dist/express/index.d.cts +3 -2
  2. package/dist/express/index.d.ts +3 -2
  3. package/dist/express/index.js +18 -0
  4. package/dist/express/index.js.map +1 -1
  5. package/dist/express/index.mjs +18 -0
  6. package/dist/express/index.mjs.map +1 -1
  7. package/dist/hono/index.d.cts +2 -2
  8. package/dist/hono/index.d.ts +2 -2
  9. package/dist/hono/index.js +17 -0
  10. package/dist/hono/index.js.map +1 -1
  11. package/dist/hono/index.mjs +17 -0
  12. package/dist/hono/index.mjs.map +1 -1
  13. package/dist/{index-weK_H8io.d.cts → index-D1Y88dmC.d.cts} +12 -1
  14. package/dist/{index-CtQgDuFR.d.ts → index-sSyUfAhM.d.ts} +12 -1
  15. package/dist/index.d.cts +4 -4
  16. package/dist/index.d.ts +4 -4
  17. package/dist/index.js +17 -0
  18. package/dist/index.js.map +1 -1
  19. package/dist/index.mjs +17 -0
  20. package/dist/index.mjs.map +1 -1
  21. package/dist/koa/index.d.cts +2 -2
  22. package/dist/koa/index.d.ts +2 -2
  23. package/dist/koa/index.js +17 -0
  24. package/dist/koa/index.js.map +1 -1
  25. package/dist/koa/index.mjs +17 -0
  26. package/dist/koa/index.mjs.map +1 -1
  27. package/dist/next/index.d.cts +2 -2
  28. package/dist/next/index.d.ts +2 -2
  29. package/dist/next/index.js +17 -0
  30. package/dist/next/index.js.map +1 -1
  31. package/dist/next/index.mjs +17 -0
  32. package/dist/next/index.mjs.map +1 -1
  33. package/dist/types/index.d.cts +2 -2
  34. package/dist/types/index.d.ts +2 -2
  35. package/dist/types/index.js.map +1 -1
  36. package/dist/types/index.mjs.map +1 -1
  37. package/dist/webhook/index.d.cts +2 -2
  38. package/dist/webhook/index.d.ts +2 -2
  39. package/dist/{webhooks-iwkEPw9n.d.cts → webhooks-CfpQ4PEE.d.cts} +9 -0
  40. package/dist/{webhooks-iwkEPw9n.d.ts → webhooks-CfpQ4PEE.d.ts} +9 -0
  41. package/package.json +1 -1
@@ -892,6 +892,22 @@ function createHellobillHandler(opts) {
892
892
  if (!result2) return;
893
893
  passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
894
894
  };
895
+ const sessionResume = async (req, res) => {
896
+ const id = typeof req.params?.id === "string" ? req.params.id : void 0;
897
+ if (!id || id.length === 0) {
898
+ sendError(res, 400, "validation.missing_required_field", "sessions/:id/resume requires a non-empty id path param");
899
+ return;
900
+ }
901
+ const result2 = await safeCallUpstream(res, {
902
+ method: "POST",
903
+ path: `/partner/sessions/${encodeURIComponent(id)}/resume`,
904
+ body: req.body,
905
+ idempotencyKey: inboundIdempotencyKey(req) ?? idempotencyKeyFactory(),
906
+ logger
907
+ });
908
+ if (!result2) return;
909
+ passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
910
+ };
895
911
  const savingsSummary = async (req, res) => {
896
912
  const rawCustomer = req.query.customer_id ?? req.params?.id;
897
913
  const customerId = Array.isArray(rawCustomer) ? rawCustomer[0] : rawCustomer;
@@ -962,6 +978,7 @@ function createHellobillHandler(opts) {
962
978
  products,
963
979
  property,
964
980
  sessions: { list: sessionsList, get: sessionsGet },
981
+ sessionResume,
965
982
  savingsSummary,
966
983
  serviceSlots,
967
984
  loaDocument
@@ -1044,6 +1061,7 @@ function createHellobillRouter(opts) {
1044
1061
  }
1045
1062
  router.use(express.json({ limit: "1mb" }));
1046
1063
  router.post("/session", asyncWrap(handlers.session));
1064
+ router.post("/session/:id/resume", asyncWrap(handlers.sessionResume));
1047
1065
  router.get("/loa", asyncWrap(handlers.loa));
1048
1066
  router.post("/bank-details", asyncWrap(handlers.bankDetails.submit));
1049
1067
  router.get("/bank-details", asyncWrap(handlers.bankDetails.get));