@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
package/dist/index.d.cts CHANGED
@@ -1,7 +1,7 @@
1
- import { T as TokenStorage, L as Logger } from './index-YlknV1_H.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-YlknV1_H.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-DPpqf7d2.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 Customer, E as CustomerType, F as DataCompleteness, G as DiscoveryStatus, H as Email, I as EnergyProduct, J as Environment, K as EpcRating, M as FinalRead, N as FuelType, O as HeatingType, Q as HomeInsuranceProduct, T as IdempotencyKey, U as IsoDate, V as IsoDateTime, W as LoASignature, X as LoaId, Y as LoaRecord, Z as LocationRole, _ as MaskedSortCode, $ as Meters, a0 as MobileProduct, a1 as MoveIn, a2 as MoveObject, a3 as MoveOut, a4 as MoveOutNotificationFailed, a5 as MoveOutNotificationSent, a6 as MoveOutNotifyFlags, a7 as MoveOutReason, a8 as MoveOutStatus, a9 as NearbyPoi, aa as OccupantObject, ab as OccupantType, ac as OnboardingInfo, ad as OverallStatus, ae as Paginated, af as Person, ag as PhoneNumber, ah as Postcode, ai as Product, aj as ProductBase, ak as ProductCategory, al as ProductConfidence, am as ProductId, an as ProductSetup, ao as PropertyDetailObject, ap as PropertyLocation, aq as PropertyObject, ar as PropertyType, as as PropertyTypeCode, at as PropertyTypeSubcode, au as ProvidedFieldPath, av as SESSION_IDEMPOTENCY_TTL_MS, aw as SavingsSummaryResponse, ax as SelectedProduct, ay as SessionAccountCreated, az as SessionAppDeferred, aA as SessionAppInstalled, aB as SessionDetailsConfirmed, aC as SessionEmbedOpened, aD as SessionLoaSigned, aE as SessionProductsSelected, aF as SetupStatus, aG as SetupStatusChanged, aH as SignatureImage, aI as StoredBankDetails, aJ as SubscriptionChanged, aK as SubscriptionStatus, aL as TvLicenceProduct, aM as Url, aN as WaterProduct, aO as WebhookEvent, aP as WebhookEventBase, aQ as WebhookEventId, aR as WebhookEventType } from './webhooks-DPpqf7d2.cjs';
1
+ import { T as TokenStorage, L as Logger } from './index-lPvEf5hZ.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-lPvEf5hZ.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-Cv4e8oXp.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 Customer, E as CustomerType, F as DataCompleteness, G as DiscoveryStatus, H as Email, I as EnergyProduct, J as Environment, K as EpcRating, M as FinalRead, N as FuelType, O as HeatingType, Q as HomeInsuranceProduct, T as IdempotencyKey, U as IsoDate, V as IsoDateTime, W as LoASignature, X as LoaId, Y as LoaRecord, Z as LocationRole, _ as MaskedSortCode, $ as Meters, a0 as MobileProduct, a1 as MoveIn, a2 as MoveObject, a3 as MoveOut, a4 as MoveOutNotificationFailed, a5 as MoveOutNotificationSent, a6 as MoveOutNotifyFlags, a7 as MoveOutReason, a8 as MoveOutStatus, a9 as NearbyPoi, aa as OccupantObject, ab as OccupantType, ac as OnboardingInfo, ad as OverallStatus, ae as Paginated, af as Person, ag as PhoneNumber, ah as Postcode, ai as Product, aj as ProductBase, ak as ProductCategory, al as ProductConfidence, am as ProductId, an as ProductSetup, ao as PropertyDetailObject, ap as PropertyLocation, aq as PropertyObject, ar as PropertyType, as as PropertyTypeCode, at as PropertyTypeSubcode, au as ProvidedFieldPath, av as SESSION_IDEMPOTENCY_TTL_MS, aw as SavingsSummaryResponse, ax as SelectedProduct, ay as SessionAccountCreated, az as SessionAppDeferred, aA as SessionAppInstalled, aB as SessionDetailsConfirmed, aC as SessionEmbedOpened, aD as SessionLoaSigned, aE as SessionProductsSelected, aF as SetupStatus, aG as SetupStatusChanged, aH as SignatureImage, aI as StoredBankDetails, aJ as SubscriptionChanged, aK as SubscriptionStatus, aL as TvLicenceProduct, aM as Url, aN as WaterProduct, aO as WebhookEvent, aP as WebhookEventBase, aQ as WebhookEventId, aR as WebhookEventType } from './webhooks-Cv4e8oXp.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-C2MzlH64.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-C2MzlH64.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-DPpqf7d2.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 Customer, E as CustomerType, F as DataCompleteness, G as DiscoveryStatus, H as Email, I as EnergyProduct, J as Environment, K as EpcRating, M as FinalRead, N as FuelType, O as HeatingType, Q as HomeInsuranceProduct, T as IdempotencyKey, U as IsoDate, V as IsoDateTime, W as LoASignature, X as LoaId, Y as LoaRecord, Z as LocationRole, _ as MaskedSortCode, $ as Meters, a0 as MobileProduct, a1 as MoveIn, a2 as MoveObject, a3 as MoveOut, a4 as MoveOutNotificationFailed, a5 as MoveOutNotificationSent, a6 as MoveOutNotifyFlags, a7 as MoveOutReason, a8 as MoveOutStatus, a9 as NearbyPoi, aa as OccupantObject, ab as OccupantType, ac as OnboardingInfo, ad as OverallStatus, ae as Paginated, af as Person, ag as PhoneNumber, ah as Postcode, ai as Product, aj as ProductBase, ak as ProductCategory, al as ProductConfidence, am as ProductId, an as ProductSetup, ao as PropertyDetailObject, ap as PropertyLocation, aq as PropertyObject, ar as PropertyType, as as PropertyTypeCode, at as PropertyTypeSubcode, au as ProvidedFieldPath, av as SESSION_IDEMPOTENCY_TTL_MS, aw as SavingsSummaryResponse, ax as SelectedProduct, ay as SessionAccountCreated, az as SessionAppDeferred, aA as SessionAppInstalled, aB as SessionDetailsConfirmed, aC as SessionEmbedOpened, aD as SessionLoaSigned, aE as SessionProductsSelected, aF as SetupStatus, aG as SetupStatusChanged, aH as SignatureImage, aI as StoredBankDetails, aJ as SubscriptionChanged, aK as SubscriptionStatus, aL as TvLicenceProduct, aM as Url, aN as WaterProduct, aO as WebhookEvent, aP as WebhookEventBase, aQ as WebhookEventId, aR as WebhookEventType } from './webhooks-DPpqf7d2.js';
1
+ import { T as TokenStorage, L as Logger } from './index-D81ftBQo.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-D81ftBQo.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-Cv4e8oXp.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 Customer, E as CustomerType, F as DataCompleteness, G as DiscoveryStatus, H as Email, I as EnergyProduct, J as Environment, K as EpcRating, M as FinalRead, N as FuelType, O as HeatingType, Q as HomeInsuranceProduct, T as IdempotencyKey, U as IsoDate, V as IsoDateTime, W as LoASignature, X as LoaId, Y as LoaRecord, Z as LocationRole, _ as MaskedSortCode, $ as Meters, a0 as MobileProduct, a1 as MoveIn, a2 as MoveObject, a3 as MoveOut, a4 as MoveOutNotificationFailed, a5 as MoveOutNotificationSent, a6 as MoveOutNotifyFlags, a7 as MoveOutReason, a8 as MoveOutStatus, a9 as NearbyPoi, aa as OccupantObject, ab as OccupantType, ac as OnboardingInfo, ad as OverallStatus, ae as Paginated, af as Person, ag as PhoneNumber, ah as Postcode, ai as Product, aj as ProductBase, ak as ProductCategory, al as ProductConfidence, am as ProductId, an as ProductSetup, ao as PropertyDetailObject, ap as PropertyLocation, aq as PropertyObject, ar as PropertyType, as as PropertyTypeCode, at as PropertyTypeSubcode, au as ProvidedFieldPath, av as SESSION_IDEMPOTENCY_TTL_MS, aw as SavingsSummaryResponse, ax as SelectedProduct, ay as SessionAccountCreated, az as SessionAppDeferred, aA as SessionAppInstalled, aB as SessionDetailsConfirmed, aC as SessionEmbedOpened, aD as SessionLoaSigned, aE as SessionProductsSelected, aF as SetupStatus, aG as SetupStatusChanged, aH as SignatureImage, aI as StoredBankDetails, aJ as SubscriptionChanged, aK as SubscriptionStatus, aL as TvLicenceProduct, aM as Url, aN as WaterProduct, aO as WebhookEvent, aP as WebhookEventBase, aQ as WebhookEventId, aR as WebhookEventType } from './webhooks-Cv4e8oXp.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
@@ -948,16 +948,25 @@ function createHellobillHandler(opts) {
948
948
  if (!result2) return;
949
949
  passthroughUpstream(res, result2.status, result2.body, result2.requestId, result2.headers);
950
950
  };
951
- const anyvanSlots = async (req, res) => {
951
+ const serviceSlots = async (req, res) => {
952
952
  const rawSession = req.query.session_id ?? req.params?.id;
953
953
  const sessionId = Array.isArray(rawSession) ? rawSession[0] : rawSession;
954
954
  if (!sessionId) {
955
955
  sendError(res, 400, "validation.missing_required_field", "session_id query parameter required");
956
956
  return;
957
957
  }
958
+ const rawService = req.query.service;
959
+ const service = Array.isArray(rawService) ? rawService[0] : rawService;
960
+ if (!service) {
961
+ sendError(res, 400, "validation.missing_required_field", "service query parameter required");
962
+ return;
963
+ }
964
+ const rawProvider = req.query.provider;
965
+ const providerRaw = Array.isArray(rawProvider) ? rawProvider[0] : rawProvider;
966
+ const provider = typeof providerRaw === "string" && providerRaw.trim().length > 0 ? providerRaw.trim() : "any_van";
958
967
  const result2 = await safeCallUpstream(res, {
959
968
  method: "GET",
960
- path: `/partner/sessions/${encodeURIComponent(sessionId)}/anyvan-slots`,
969
+ path: `/partner/sessions/${encodeURIComponent(sessionId)}/service-slots?service=${encodeURIComponent(service)}&provider=${encodeURIComponent(provider)}`,
961
970
  logger
962
971
  });
963
972
  if (!result2) return;
@@ -974,7 +983,7 @@ function createHellobillHandler(opts) {
974
983
  property,
975
984
  sessions: { list: sessionsList, get: sessionsGet },
976
985
  savingsSummary,
977
- anyvanSlots
986
+ serviceSlots
978
987
  };
979
988
  if (webhookHandler !== void 0) {
980
989
  result.webhook = webhookHandler;