@hello-bill/node 1.0.4 → 2.1.0-beta.0

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 +2 -2
  3. package/dist/express/index.d.ts +2 -2
  4. package/dist/express/index.js +12 -3
  5. package/dist/express/index.js.map +1 -1
  6. package/dist/express/index.mjs +12 -3
  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 +12 -3
  11. package/dist/hono/index.js.map +1 -1
  12. package/dist/hono/index.mjs +12 -3
  13. package/dist/hono/index.mjs.map +1 -1
  14. package/dist/{index-C2MzlH64.d.ts → index-D81ftBQo.d.ts} +5 -3
  15. package/dist/{index-YlknV1_H.d.cts → index-lPvEf5hZ.d.cts} +5 -3
  16. package/dist/index.d.cts +4 -4
  17. package/dist/index.d.ts +4 -4
  18. package/dist/index.js +12 -3
  19. package/dist/index.js.map +1 -1
  20. package/dist/index.mjs +12 -3
  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 +12 -3
  25. package/dist/koa/index.js.map +1 -1
  26. package/dist/koa/index.mjs +12 -3
  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 +12 -3
  31. package/dist/next/index.js.map +1 -1
  32. package/dist/next/index.mjs +12 -3
  33. package/dist/next/index.mjs.map +1 -1
  34. package/dist/types/index.d.cts +3 -3
  35. package/dist/types/index.d.ts +3 -3
  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-DPpqf7d2.d.cts → webhooks-Cv4e8oXp.d.cts} +3 -2
  41. package/dist/{webhooks-DPpqf7d2.d.ts → webhooks-Cv4e8oXp.d.ts} +3 -2
  42. package/package.json +1 -1
@@ -904,16 +904,25 @@ function createHellobillHandler(opts) {
904
904
  if (!result2) return;
905
905
  passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
906
906
  };
907
- const anyvanSlots = async (req, res) => {
907
+ const serviceSlots = async (req, res) => {
908
908
  const rawSession = req.query.session_id ?? req.params?.id;
909
909
  const sessionId = Array.isArray(rawSession) ? rawSession[0] : rawSession;
910
910
  if (!sessionId) {
911
911
  sendError(res, 400, "validation.missing_required_field", "session_id query parameter required");
912
912
  return;
913
913
  }
914
+ const rawService = req.query.service;
915
+ const service = Array.isArray(rawService) ? rawService[0] : rawService;
916
+ if (!service) {
917
+ sendError(res, 400, "validation.missing_required_field", "service query parameter required");
918
+ return;
919
+ }
920
+ const rawProvider = req.query.provider;
921
+ const providerRaw = Array.isArray(rawProvider) ? rawProvider[0] : rawProvider;
922
+ const provider = typeof providerRaw === "string" && providerRaw.trim().length > 0 ? providerRaw.trim() : "any_van";
914
923
  const result2 = await safeCallUpstream(res, {
915
924
  method: "GET",
916
- path: `/partner/sessions/${encodeURIComponent(sessionId)}/anyvan-slots`,
925
+ path: `/partner/sessions/${encodeURIComponent(sessionId)}/service-slots?service=${encodeURIComponent(service)}&provider=${encodeURIComponent(provider)}`,
917
926
  logger
918
927
  });
919
928
  if (!result2) return;
@@ -930,7 +939,7 @@ function createHellobillHandler(opts) {
930
939
  property,
931
940
  sessions: { list: sessionsList, get: sessionsGet },
932
941
  savingsSummary,
933
- anyvanSlots
942
+ serviceSlots
934
943
  };
935
944
  if (webhookHandler !== void 0) {
936
945
  result.webhook = webhookHandler;