@hello-bill/node 2.1.1-beta.6 → 2.1.1
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 +21 -24
- package/dist/express/index.d.cts +2 -2
- package/dist/express/index.d.ts +2 -2
- package/dist/express/index.js +1 -20
- package/dist/express/index.js.map +1 -1
- package/dist/express/index.mjs +1 -20
- 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 +1 -20
- package/dist/hono/index.js.map +1 -1
- package/dist/hono/index.mjs +1 -20
- package/dist/hono/index.mjs.map +1 -1
- package/dist/{index-BAETgMms.d.ts → index-D5WlUYVZ.d.cts} +1 -7
- package/dist/{index-9PkSdjVq.d.cts → index-jK9cEnEY.d.ts} +1 -7
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -17
- 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 +1 -20
- package/dist/koa/index.js.map +1 -1
- package/dist/koa/index.mjs +1 -20
- 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 +1 -23
- package/dist/next/index.js.map +1 -1
- package/dist/next/index.mjs +1 -23
- package/dist/next/index.mjs.map +1 -1
- package/dist/types/index.d.cts +2 -2
- package/dist/types/index.d.ts +2 -2
- package/dist/webhook/index.d.cts +2 -2
- package/dist/webhook/index.d.ts +2 -2
- package/dist/{webhooks-Cv4e8oXp.d.cts → webhooks-DePW-Bjp.d.cts} +16 -1
- package/dist/{webhooks-Cv4e8oXp.d.ts → webhooks-DePW-Bjp.d.ts} +16 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aR as WebhookEvent, aE as SessionEmbedOpened, aD as SessionDetailsConfirmed, aG as SessionProductsSelected, aF as SessionLoaSigned, aA as SessionAccountCreated, aC as SessionAppInstalled, aB as SessionAppDeferred, aL as SubscriptionChanged, aI as SetupStatusChanged, a7 as MoveOutNotificationSent, a6 as MoveOutNotificationFailed, m as BankDetailsCollected, S as SessionPayload } from './webhooks-DePW-Bjp.cjs';
|
|
2
2
|
|
|
3
3
|
interface TokenStorage {
|
|
4
4
|
get(clientId: string): Promise<{
|
|
@@ -340,12 +340,6 @@ interface HellobillHandlerSet {
|
|
|
340
340
|
* Scoped to the partner's access_token — no session_token required.
|
|
341
341
|
*/
|
|
342
342
|
serviceSlots: (req: HellobillRequest, res: HellobillResponse) => Promise<void>;
|
|
343
|
-
/**
|
|
344
|
-
* Proxies GET /partner/loa/:id/document.
|
|
345
|
-
* Reads the loa id from req.query.loa_id or req.params.id.
|
|
346
|
-
* Scoped to the partner's access_token — no session_token required.
|
|
347
|
-
*/
|
|
348
|
-
loaDocument: (req: HellobillRequest, res: HellobillResponse) => Promise<void>;
|
|
349
343
|
/**
|
|
350
344
|
* Optional webhook receiver. Present only when `opts.webhook` is supplied to
|
|
351
345
|
* `createHellobillHandler`. The Express adapter mounts POST /webhooks when
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { aR as WebhookEvent, aE as SessionEmbedOpened, aD as SessionDetailsConfirmed, aG as SessionProductsSelected, aF as SessionLoaSigned, aA as SessionAccountCreated, aC as SessionAppInstalled, aB as SessionAppDeferred, aL as SubscriptionChanged, aI as SetupStatusChanged, a7 as MoveOutNotificationSent, a6 as MoveOutNotificationFailed, m as BankDetailsCollected, S as SessionPayload } from './webhooks-DePW-Bjp.js';
|
|
2
2
|
|
|
3
3
|
interface TokenStorage {
|
|
4
4
|
get(clientId: string): Promise<{
|
|
@@ -340,12 +340,6 @@ interface HellobillHandlerSet {
|
|
|
340
340
|
* Scoped to the partner's access_token — no session_token required.
|
|
341
341
|
*/
|
|
342
342
|
serviceSlots: (req: HellobillRequest, res: HellobillResponse) => Promise<void>;
|
|
343
|
-
/**
|
|
344
|
-
* Proxies GET /partner/loa/:id/document.
|
|
345
|
-
* Reads the loa id from req.query.loa_id or req.params.id.
|
|
346
|
-
* Scoped to the partner's access_token — no session_token required.
|
|
347
|
-
*/
|
|
348
|
-
loaDocument: (req: HellobillRequest, res: HellobillResponse) => Promise<void>;
|
|
349
343
|
/**
|
|
350
344
|
* Optional webhook receiver. Present only when `opts.webhook` is supplied to
|
|
351
345
|
* `createHellobillHandler`. The Express adapter mounts POST /webhooks when
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TokenStorage, L as Logger } from './index-
|
|
2
|
-
export { C as CreateHellobillHandlerOptions, H as HellobillHandlerSet, a as HellobillRequest, b as HellobillResponse, I as InMemoryTokenStorage, c as InMemoryWebhookDedupeStore, d as TokenManager, e as TokenManagerOptions, U as UnknownWebhookEventError, V as VerifyWebhookOptions, W as WebhookDedupeStore, f as WebhookHandlerContext, g as WebhookHandlerOptions, h as WebhookHandlers, i as WebhookVerificationError, j as createHellobillHandler, k as createWebhookHandler, v as verifyWebhook, l as verifyWebhookSignature } from './index-
|
|
3
|
-
import { R as RequestId, S as SessionPayload, a as SessionResponse, b as SessionGetResponse, P as ProductsQuery, c as ProductsResponse, d as PropertyDetailResponse, L as LoaListResponse, C as CreateCustomerInput, e as CustomerCreateResponse, f as CustomerId, g as CustomerStatusResponse, B as BankDetailsRequest, h as BankDetailsResponse } from './webhooks-
|
|
4
|
-
export { A as Address, i as AddressObject, j as AddressesObject, k as ApiVersion, l as AppDeeplinks, m as BankDetailsCollected, n as BankDetailsConsent, o as BankDetailsObject, p as BankDetailsStatus, q as BillType, r as BreakdownCoverProduct, s as BroadbandProduct, t as BuildingStyle, u as BuildingType, v as CacheStatus, w as ClientMode, x as Consent, y as ContextEntry, z as CouncilTaxProduct, D as
|
|
1
|
+
import { T as TokenStorage, L as Logger } from './index-D5WlUYVZ.cjs';
|
|
2
|
+
export { C as CreateHellobillHandlerOptions, H as HellobillHandlerSet, a as HellobillRequest, b as HellobillResponse, I as InMemoryTokenStorage, c as InMemoryWebhookDedupeStore, d as TokenManager, e as TokenManagerOptions, U as UnknownWebhookEventError, V as VerifyWebhookOptions, W as WebhookDedupeStore, f as WebhookHandlerContext, g as WebhookHandlerOptions, h as WebhookHandlers, i as WebhookVerificationError, j as createHellobillHandler, k as createWebhookHandler, v as verifyWebhook, l as verifyWebhookSignature } from './index-D5WlUYVZ.cjs';
|
|
3
|
+
import { R as RequestId, S as SessionPayload, a as SessionResponse, b as SessionGetResponse, P as ProductsQuery, c as ProductsResponse, d as PropertyDetailResponse, L as LoaListResponse, C as CreateCustomerInput, e as CustomerCreateResponse, f as CustomerId, g as CustomerStatusResponse, B as BankDetailsRequest, h as BankDetailsResponse } from './webhooks-DePW-Bjp.cjs';
|
|
4
|
+
export { A as Address, i as AddressObject, j as AddressesObject, k as ApiVersion, l as AppDeeplinks, m as BankDetailsCollected, n as BankDetailsConsent, o as BankDetailsObject, p as BankDetailsStatus, q as BillType, r as BreakdownCoverProduct, s as BroadbandProduct, t as BuildingStyle, u as BuildingType, v as CacheStatus, w as ClientMode, x as Consent, y as ContextEntry, z as CouncilTaxProduct, D as CreditCheckAddress, E as CreditCheckObject, F as Customer, G as CustomerType, H as DataCompleteness, I as DiscoveryStatus, J as Email, K as EnergyProduct, M as Environment, N as EpcRating, O as FinalRead, Q as FuelType, T as HeatingType, U as HomeInsuranceProduct, V as IdempotencyKey, W as IsoDate, X as IsoDateTime, Y as LoASignature, Z as LoaId, _ as LoaRecord, $ as LocationRole, a0 as MaskedSortCode, a1 as Meters, a2 as MobileProduct, a3 as MoveIn, a4 as MoveObject, a5 as MoveOut, a6 as MoveOutNotificationFailed, a7 as MoveOutNotificationSent, a8 as MoveOutNotifyFlags, a9 as MoveOutReason, aa as MoveOutStatus, ab as NearbyPoi, ac as OccupantObject, ad as OccupantType, ae as OnboardingInfo, af as OverallStatus, ag as Paginated, ah as Person, ai as PhoneNumber, aj as Postcode, ak as Product, al as ProductBase, am as ProductCategory, an as ProductConfidence, ao as ProductId, ap as ProductSetup, aq as PropertyDetailObject, ar as PropertyLocation, as as PropertyObject, at as PropertyType, au as PropertyTypeCode, av as PropertyTypeSubcode, aw as ProvidedFieldPath, ax as SESSION_IDEMPOTENCY_TTL_MS, ay as SavingsSummaryResponse, az as SelectedProduct, aA as SessionAccountCreated, aB as SessionAppDeferred, aC as SessionAppInstalled, aD as SessionDetailsConfirmed, aE as SessionEmbedOpened, aF as SessionLoaSigned, aG as SessionProductsSelected, aH as SetupStatus, aI as SetupStatusChanged, aJ as SignatureImage, aK as StoredBankDetails, aL as SubscriptionChanged, aM as SubscriptionStatus, aN as Title, aO as TvLicenceProduct, aP as Url, aQ as WaterProduct, aR as WebhookEvent, aS as WebhookEventBase, aT as WebhookEventId, aU as WebhookEventType } from './webhooks-DePW-Bjp.cjs';
|
|
5
5
|
import { ErrorEnvelope } from './types/index.cjs';
|
|
6
6
|
export { AnyvanSlot, AnyvanSlotsResponse, ErrorCode, ErrorType, RETRYABLE_HTTP_STATUSES } from './types/index.cjs';
|
|
7
7
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { T as TokenStorage, L as Logger } from './index-
|
|
2
|
-
export { C as CreateHellobillHandlerOptions, H as HellobillHandlerSet, a as HellobillRequest, b as HellobillResponse, I as InMemoryTokenStorage, c as InMemoryWebhookDedupeStore, d as TokenManager, e as TokenManagerOptions, U as UnknownWebhookEventError, V as VerifyWebhookOptions, W as WebhookDedupeStore, f as WebhookHandlerContext, g as WebhookHandlerOptions, h as WebhookHandlers, i as WebhookVerificationError, j as createHellobillHandler, k as createWebhookHandler, v as verifyWebhook, l as verifyWebhookSignature } from './index-
|
|
3
|
-
import { R as RequestId, S as SessionPayload, a as SessionResponse, b as SessionGetResponse, P as ProductsQuery, c as ProductsResponse, d as PropertyDetailResponse, L as LoaListResponse, C as CreateCustomerInput, e as CustomerCreateResponse, f as CustomerId, g as CustomerStatusResponse, B as BankDetailsRequest, h as BankDetailsResponse } from './webhooks-
|
|
4
|
-
export { A as Address, i as AddressObject, j as AddressesObject, k as ApiVersion, l as AppDeeplinks, m as BankDetailsCollected, n as BankDetailsConsent, o as BankDetailsObject, p as BankDetailsStatus, q as BillType, r as BreakdownCoverProduct, s as BroadbandProduct, t as BuildingStyle, u as BuildingType, v as CacheStatus, w as ClientMode, x as Consent, y as ContextEntry, z as CouncilTaxProduct, D as
|
|
1
|
+
import { T as TokenStorage, L as Logger } from './index-jK9cEnEY.js';
|
|
2
|
+
export { C as CreateHellobillHandlerOptions, H as HellobillHandlerSet, a as HellobillRequest, b as HellobillResponse, I as InMemoryTokenStorage, c as InMemoryWebhookDedupeStore, d as TokenManager, e as TokenManagerOptions, U as UnknownWebhookEventError, V as VerifyWebhookOptions, W as WebhookDedupeStore, f as WebhookHandlerContext, g as WebhookHandlerOptions, h as WebhookHandlers, i as WebhookVerificationError, j as createHellobillHandler, k as createWebhookHandler, v as verifyWebhook, l as verifyWebhookSignature } from './index-jK9cEnEY.js';
|
|
3
|
+
import { R as RequestId, S as SessionPayload, a as SessionResponse, b as SessionGetResponse, P as ProductsQuery, c as ProductsResponse, d as PropertyDetailResponse, L as LoaListResponse, C as CreateCustomerInput, e as CustomerCreateResponse, f as CustomerId, g as CustomerStatusResponse, B as BankDetailsRequest, h as BankDetailsResponse } from './webhooks-DePW-Bjp.js';
|
|
4
|
+
export { A as Address, i as AddressObject, j as AddressesObject, k as ApiVersion, l as AppDeeplinks, m as BankDetailsCollected, n as BankDetailsConsent, o as BankDetailsObject, p as BankDetailsStatus, q as BillType, r as BreakdownCoverProduct, s as BroadbandProduct, t as BuildingStyle, u as BuildingType, v as CacheStatus, w as ClientMode, x as Consent, y as ContextEntry, z as CouncilTaxProduct, D as CreditCheckAddress, E as CreditCheckObject, F as Customer, G as CustomerType, H as DataCompleteness, I as DiscoveryStatus, J as Email, K as EnergyProduct, M as Environment, N as EpcRating, O as FinalRead, Q as FuelType, T as HeatingType, U as HomeInsuranceProduct, V as IdempotencyKey, W as IsoDate, X as IsoDateTime, Y as LoASignature, Z as LoaId, _ as LoaRecord, $ as LocationRole, a0 as MaskedSortCode, a1 as Meters, a2 as MobileProduct, a3 as MoveIn, a4 as MoveObject, a5 as MoveOut, a6 as MoveOutNotificationFailed, a7 as MoveOutNotificationSent, a8 as MoveOutNotifyFlags, a9 as MoveOutReason, aa as MoveOutStatus, ab as NearbyPoi, ac as OccupantObject, ad as OccupantType, ae as OnboardingInfo, af as OverallStatus, ag as Paginated, ah as Person, ai as PhoneNumber, aj as Postcode, ak as Product, al as ProductBase, am as ProductCategory, an as ProductConfidence, ao as ProductId, ap as ProductSetup, aq as PropertyDetailObject, ar as PropertyLocation, as as PropertyObject, at as PropertyType, au as PropertyTypeCode, av as PropertyTypeSubcode, aw as ProvidedFieldPath, ax as SESSION_IDEMPOTENCY_TTL_MS, ay as SavingsSummaryResponse, az as SelectedProduct, aA as SessionAccountCreated, aB as SessionAppDeferred, aC as SessionAppInstalled, aD as SessionDetailsConfirmed, aE as SessionEmbedOpened, aF as SessionLoaSigned, aG as SessionProductsSelected, aH as SetupStatus, aI as SetupStatusChanged, aJ as SignatureImage, aK as StoredBankDetails, aL as SubscriptionChanged, aM as SubscriptionStatus, aN as Title, aO as TvLicenceProduct, aP as Url, aQ as WaterProduct, aR as WebhookEvent, aS as WebhookEventBase, aT as WebhookEventId, aU as WebhookEventType } from './webhooks-DePW-Bjp.js';
|
|
5
5
|
import { ErrorEnvelope } from './types/index.js';
|
|
6
6
|
export { AnyvanSlot, AnyvanSlotsResponse, ErrorCode, ErrorType, RETRYABLE_HTTP_STATUSES } from './types/index.js';
|
|
7
7
|
|
package/dist/index.js
CHANGED
|
@@ -972,21 +972,6 @@ function createHellobillHandler(opts) {
|
|
|
972
972
|
if (!result2) return;
|
|
973
973
|
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
974
974
|
};
|
|
975
|
-
const loaDocument = async (req, res) => {
|
|
976
|
-
const rawLoa = req.query.loa_id ?? req.params?.id;
|
|
977
|
-
const loaId = Array.isArray(rawLoa) ? rawLoa[0] : rawLoa;
|
|
978
|
-
if (!loaId) {
|
|
979
|
-
sendError(res, 400, "validation.missing_required_field", "loa_id query parameter required");
|
|
980
|
-
return;
|
|
981
|
-
}
|
|
982
|
-
const result2 = await safeCallUpstream(res, {
|
|
983
|
-
method: "GET",
|
|
984
|
-
path: `/partner/loa/${encodeURIComponent(loaId)}/document`,
|
|
985
|
-
logger
|
|
986
|
-
});
|
|
987
|
-
if (!result2) return;
|
|
988
|
-
passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
|
|
989
|
-
};
|
|
990
975
|
const webhookHandler = opts.webhook ? createWebhookHandler({ ...opts.webhook, logger: opts.webhook.logger ?? opts.logger }) : void 0;
|
|
991
976
|
const result = {
|
|
992
977
|
session,
|
|
@@ -998,8 +983,7 @@ function createHellobillHandler(opts) {
|
|
|
998
983
|
property,
|
|
999
984
|
sessions: { list: sessionsList, get: sessionsGet },
|
|
1000
985
|
savingsSummary,
|
|
1001
|
-
serviceSlots
|
|
1002
|
-
loaDocument
|
|
986
|
+
serviceSlots
|
|
1003
987
|
};
|
|
1004
988
|
if (webhookHandler !== void 0) {
|
|
1005
989
|
result.webhook = webhookHandler;
|