@hello-bill/node 2.1.0-beta.1 → 2.1.0-beta.3
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 +14 -0
- package/dist/express/index.d.cts +1 -1
- package/dist/express/index.d.ts +1 -1
- package/dist/express/index.js +20 -1
- package/dist/express/index.js.map +1 -1
- package/dist/express/index.mjs +20 -1
- package/dist/express/index.mjs.map +1 -1
- package/dist/hono/index.d.cts +1 -1
- package/dist/hono/index.d.ts +1 -1
- package/dist/hono/index.js +20 -1
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/index.mjs +20 -1
- package/dist/hono/index.mjs.map +1 -1
- package/dist/{index-lPvEf5hZ.d.cts → index-9PkSdjVq.d.cts} +6 -0
- package/dist/{index-D81ftBQo.d.ts → index-BAETgMms.d.ts} +6 -0
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +17 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +17 -1
- package/dist/index.mjs.map +1 -1
- package/dist/koa/index.d.cts +1 -1
- package/dist/koa/index.d.ts +1 -1
- package/dist/koa/index.js +20 -1
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/index.mjs +20 -1
- package/dist/koa/index.mjs.map +1 -1
- package/dist/next/index.d.cts +1 -1
- package/dist/next/index.d.ts +1 -1
- package/dist/next/index.js +23 -1
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +23 -1
- package/dist/next/index.mjs.map +1 -1
- package/dist/webhook/index.d.cts +1 -1
- package/dist/webhook/index.d.ts +1 -1
- package/package.json +1 -1
package/dist/next/index.mjs
CHANGED
|
@@ -928,6 +928,21 @@ function createHellobillHandler(opts) {
|
|
|
928
928
|
if (!result2) return;
|
|
929
929
|
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
930
930
|
};
|
|
931
|
+
const loaDocument = async (req, res) => {
|
|
932
|
+
const rawLoa = req.query.loa_id ?? req.params?.id;
|
|
933
|
+
const loaId = Array.isArray(rawLoa) ? rawLoa[0] : rawLoa;
|
|
934
|
+
if (!loaId) {
|
|
935
|
+
sendError(res, 400, "validation.missing_required_field", "loa_id query parameter required");
|
|
936
|
+
return;
|
|
937
|
+
}
|
|
938
|
+
const result2 = await safeCallUpstream(res, {
|
|
939
|
+
method: "GET",
|
|
940
|
+
path: `/partner/loa/${encodeURIComponent(loaId)}/document`,
|
|
941
|
+
logger
|
|
942
|
+
});
|
|
943
|
+
if (!result2) return;
|
|
944
|
+
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
945
|
+
};
|
|
931
946
|
const webhookHandler = opts.webhook ? createWebhookHandler({ ...opts.webhook, logger: opts.webhook.logger ?? opts.logger }) : void 0;
|
|
932
947
|
const result = {
|
|
933
948
|
session,
|
|
@@ -939,7 +954,8 @@ function createHellobillHandler(opts) {
|
|
|
939
954
|
property,
|
|
940
955
|
sessions: { list: sessionsList, get: sessionsGet },
|
|
941
956
|
savingsSummary,
|
|
942
|
-
serviceSlots
|
|
957
|
+
serviceSlots,
|
|
958
|
+
loaDocument
|
|
943
959
|
};
|
|
944
960
|
if (webhookHandler !== void 0) {
|
|
945
961
|
result.webhook = webhookHandler;
|
|
@@ -1068,6 +1084,12 @@ function createHellobillHandler2(opts) {
|
|
|
1068
1084
|
await handlers.sessions.list(hbReq, res);
|
|
1069
1085
|
} else if (segment === "sessions" && slug[1] && method === "GET") {
|
|
1070
1086
|
await handlers.sessions.get(hbReq, res);
|
|
1087
|
+
} else if (segment === "service-slots" && method === "GET") {
|
|
1088
|
+
await handlers.serviceSlots(hbReq, res);
|
|
1089
|
+
} else if (segment === "savings-summary" && method === "GET") {
|
|
1090
|
+
await handlers.savingsSummary(hbReq, res);
|
|
1091
|
+
} else if (segment === "loa-document" && method === "GET") {
|
|
1092
|
+
await handlers.loaDocument(hbReq, res);
|
|
1071
1093
|
} else if (segment === "webhooks" && method === "POST" && handlers.webhook) {
|
|
1072
1094
|
await handlers.webhook(hbReq, res);
|
|
1073
1095
|
} else if (segment === "webhooks" && method === "POST" && !handlers.webhook) {
|