@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.
- package/CHANGELOG.md +2 -0
- package/dist/express/index.d.cts +2 -2
- package/dist/express/index.d.ts +2 -2
- package/dist/express/index.js +12 -3
- package/dist/express/index.js.map +1 -1
- package/dist/express/index.mjs +12 -3
- 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 +12 -3
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/index.mjs +12 -3
- package/dist/hono/index.mjs.map +1 -1
- package/dist/{index-C2MzlH64.d.ts → index-D81ftBQo.d.ts} +5 -3
- package/dist/{index-YlknV1_H.d.cts → index-lPvEf5hZ.d.cts} +5 -3
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -3
- 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 +12 -3
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/index.mjs +12 -3
- 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 +12 -3
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +12 -3
- package/dist/next/index.mjs.map +1 -1
- package/dist/types/index.d.cts +3 -3
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.js.map +1 -1
- package/dist/types/index.mjs.map +1 -1
- package/dist/webhook/index.d.cts +2 -2
- package/dist/webhook/index.d.ts +2 -2
- package/dist/{webhooks-DPpqf7d2.d.cts → webhooks-Cv4e8oXp.d.cts} +3 -2
- package/dist/{webhooks-DPpqf7d2.d.ts → webhooks-Cv4e8oXp.d.ts} +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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-lPvEf5hZ.cjs';
|
|
2
|
+
import '../webhooks-Cv4e8oXp.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-D81ftBQo.js';
|
|
2
|
+
import '../webhooks-Cv4e8oXp.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Express adapter for the framework-agnostic SDK core.
|
package/dist/express/index.js
CHANGED
|
@@ -908,16 +908,25 @@ function createHellobillHandler(opts) {
|
|
|
908
908
|
if (!result2) return;
|
|
909
909
|
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
910
910
|
};
|
|
911
|
-
const
|
|
911
|
+
const serviceSlots = async (req, res) => {
|
|
912
912
|
const rawSession = req.query.session_id ?? req.params?.id;
|
|
913
913
|
const sessionId = Array.isArray(rawSession) ? rawSession[0] : rawSession;
|
|
914
914
|
if (!sessionId) {
|
|
915
915
|
sendError(res, 400, "validation.missing_required_field", "session_id query parameter required");
|
|
916
916
|
return;
|
|
917
917
|
}
|
|
918
|
+
const rawService = req.query.service;
|
|
919
|
+
const service = Array.isArray(rawService) ? rawService[0] : rawService;
|
|
920
|
+
if (!service) {
|
|
921
|
+
sendError(res, 400, "validation.missing_required_field", "service query parameter required");
|
|
922
|
+
return;
|
|
923
|
+
}
|
|
924
|
+
const rawProvider = req.query.provider;
|
|
925
|
+
const providerRaw = Array.isArray(rawProvider) ? rawProvider[0] : rawProvider;
|
|
926
|
+
const provider = typeof providerRaw === "string" && providerRaw.trim().length > 0 ? providerRaw.trim() : "any_van";
|
|
918
927
|
const result2 = await safeCallUpstream(res, {
|
|
919
928
|
method: "GET",
|
|
920
|
-
path: `/partner/sessions/${encodeURIComponent(sessionId)}/
|
|
929
|
+
path: `/partner/sessions/${encodeURIComponent(sessionId)}/service-slots?service=${encodeURIComponent(service)}&provider=${encodeURIComponent(provider)}`,
|
|
921
930
|
logger
|
|
922
931
|
});
|
|
923
932
|
if (!result2) return;
|
|
@@ -934,7 +943,7 @@ function createHellobillHandler(opts) {
|
|
|
934
943
|
property,
|
|
935
944
|
sessions: { list: sessionsList, get: sessionsGet },
|
|
936
945
|
savingsSummary,
|
|
937
|
-
|
|
946
|
+
serviceSlots
|
|
938
947
|
};
|
|
939
948
|
if (webhookHandler !== void 0) {
|
|
940
949
|
result.webhook = webhookHandler;
|