@billkit-eu/sdk 0.4.0 → 0.5.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/dist/index.d.cts CHANGED
@@ -1025,6 +1025,18 @@ declare class WebhookEndpoints extends BaseResource {
1025
1025
  pageSize?: number;
1026
1026
  }): AsyncIterableIterator<T>;
1027
1027
  /** Fetch one delivery row for inspection before deciding to redeliver. */
1028
+ retrieveDelivery<T = unknown>(endpointId: string, deliveryId: string): Promise<T>;
1029
+ /**
1030
+ * @deprecated Renamed to {@link WebhookEndpoints.retrieveDelivery}.
1031
+ *
1032
+ * Every other single-row fetch in every BillKit SDK is `retrieve`; this
1033
+ * one method was `get`, which meant reaching for the obvious name and
1034
+ * getting a type error. The python and php clients already spell it
1035
+ * `retrieve_delivery` / `retrieveDelivery`, so node was the outlier.
1036
+ *
1037
+ * Kept as an alias because removing it would break callers for a naming
1038
+ * preference. It will go in the next major.
1039
+ */
1028
1040
  getDelivery<T = unknown>(endpointId: string, deliveryId: string): Promise<T>;
1029
1041
  /**
1030
1042
  * Re-enqueue a delivery row for the dispatcher.
@@ -1318,7 +1330,7 @@ declare class RateLimitError extends BillKitError {
1318
1330
  });
1319
1331
  }
1320
1332
 
1321
- declare const VERSION = "0.4.0";
1333
+ declare const VERSION = "0.5.0";
1322
1334
 
1323
1335
  /**
1324
1336
  * Verify `BillKit-Signature: t=<unix>,v1=<hex>` headers.
@@ -1350,4 +1362,4 @@ interface VerifyWebhookOptions {
1350
1362
  }
1351
1363
  declare function verifyWebhookSignature<T = unknown>(options: VerifyWebhookOptions): Promise<T>;
1352
1364
 
1353
- export { APIConnectionError, APIError, type AuditLogsListParams, AuthenticationError, type BaseListParams, BillKit, BillKitError, type BillKitLogger, type BillKitOptions, ConflictError, type CreateBillingPortalSessionParams, type CreateCheckoutSessionParams, type CreateCouponParams, type CreateCustomerParams, type CreateOneShotPaymentParams, type CreatePriceParams, type CreateProductParams, type CreateRefundParams, type CreateTaxRateParams, type CreateUsageRecordParams, type CreateWebhookEndpointParams, type CreditNotesListParams, DEFAULT_RETRY_POLICY, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type EventsListParams, type IdempotencyOptions, InvalidRequestError, type ListParams, type ListResponseEnvelope, type LogContext, NOOP_LOGGER, type PaginateOptions, PermissionError, type PriceTier, type PricesListParams, RateLimitError, ResourceMissingError, type RetryPolicy, type RotateProviderCredentialParams, ServerError, type SetPortalBrandingParams, type SubscriptionsListParams, type UpdateCouponParams, type UpdateCustomerParams, type UpdateProductParams, type UpdateTaxRateParams, type UpdateWebhookEndpointParams, type UsageRecordsListParams, VERSION, type ValidateCouponParams, type VerifyWebhookOptions, type VoidInvoiceParams, WebhookVerificationError, paginate, verifyWebhookSignature };
1365
+ export { APIConnectionError, APIError, type AuditLogsListParams, AuthenticationError, type BaseListParams, BillKit, BillKitError, type BillKitLogger, type BillKitOptions, ConflictError, type CreateBillingPortalSessionParams, type CreateCheckoutSessionParams, type CreateCouponParams, type CreateCustomerParams, type CreateOneShotPaymentParams, type CreatePriceParams, type CreateProductParams, type CreateRefundParams, type CreateTaxRateParams, type CreateUsageRecordParams, type CreateWebhookEndpointParams, type CreditNotesListParams, type CustomerListParams, DEFAULT_RETRY_POLICY, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type EventsListParams, type IdempotencyOptions, InvalidRequestError, type ListParams, type ListResponseEnvelope, type LogContext, NOOP_LOGGER, type PaginateOptions, PermissionError, type PriceTier, type PricesListParams, RateLimitError, ResourceMissingError, type RetryPolicy, type RotateProviderCredentialParams, ServerError, type SetPortalBrandingParams, type SubscriptionsListParams, type UpdateCouponParams, type UpdateCustomerParams, type UpdateProductParams, type UpdateTaxRateParams, type UpdateWebhookEndpointParams, type UsageRecordsListParams, VERSION, type ValidateCouponParams, type VerifyWebhookOptions, type VoidInvoiceParams, WebhookVerificationError, paginate, verifyWebhookSignature };
package/dist/index.d.ts CHANGED
@@ -1025,6 +1025,18 @@ declare class WebhookEndpoints extends BaseResource {
1025
1025
  pageSize?: number;
1026
1026
  }): AsyncIterableIterator<T>;
1027
1027
  /** Fetch one delivery row for inspection before deciding to redeliver. */
1028
+ retrieveDelivery<T = unknown>(endpointId: string, deliveryId: string): Promise<T>;
1029
+ /**
1030
+ * @deprecated Renamed to {@link WebhookEndpoints.retrieveDelivery}.
1031
+ *
1032
+ * Every other single-row fetch in every BillKit SDK is `retrieve`; this
1033
+ * one method was `get`, which meant reaching for the obvious name and
1034
+ * getting a type error. The python and php clients already spell it
1035
+ * `retrieve_delivery` / `retrieveDelivery`, so node was the outlier.
1036
+ *
1037
+ * Kept as an alias because removing it would break callers for a naming
1038
+ * preference. It will go in the next major.
1039
+ */
1028
1040
  getDelivery<T = unknown>(endpointId: string, deliveryId: string): Promise<T>;
1029
1041
  /**
1030
1042
  * Re-enqueue a delivery row for the dispatcher.
@@ -1318,7 +1330,7 @@ declare class RateLimitError extends BillKitError {
1318
1330
  });
1319
1331
  }
1320
1332
 
1321
- declare const VERSION = "0.4.0";
1333
+ declare const VERSION = "0.5.0";
1322
1334
 
1323
1335
  /**
1324
1336
  * Verify `BillKit-Signature: t=<unix>,v1=<hex>` headers.
@@ -1350,4 +1362,4 @@ interface VerifyWebhookOptions {
1350
1362
  }
1351
1363
  declare function verifyWebhookSignature<T = unknown>(options: VerifyWebhookOptions): Promise<T>;
1352
1364
 
1353
- export { APIConnectionError, APIError, type AuditLogsListParams, AuthenticationError, type BaseListParams, BillKit, BillKitError, type BillKitLogger, type BillKitOptions, ConflictError, type CreateBillingPortalSessionParams, type CreateCheckoutSessionParams, type CreateCouponParams, type CreateCustomerParams, type CreateOneShotPaymentParams, type CreatePriceParams, type CreateProductParams, type CreateRefundParams, type CreateTaxRateParams, type CreateUsageRecordParams, type CreateWebhookEndpointParams, type CreditNotesListParams, DEFAULT_RETRY_POLICY, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type EventsListParams, type IdempotencyOptions, InvalidRequestError, type ListParams, type ListResponseEnvelope, type LogContext, NOOP_LOGGER, type PaginateOptions, PermissionError, type PriceTier, type PricesListParams, RateLimitError, ResourceMissingError, type RetryPolicy, type RotateProviderCredentialParams, ServerError, type SetPortalBrandingParams, type SubscriptionsListParams, type UpdateCouponParams, type UpdateCustomerParams, type UpdateProductParams, type UpdateTaxRateParams, type UpdateWebhookEndpointParams, type UsageRecordsListParams, VERSION, type ValidateCouponParams, type VerifyWebhookOptions, type VoidInvoiceParams, WebhookVerificationError, paginate, verifyWebhookSignature };
1365
+ export { APIConnectionError, APIError, type AuditLogsListParams, AuthenticationError, type BaseListParams, BillKit, BillKitError, type BillKitLogger, type BillKitOptions, ConflictError, type CreateBillingPortalSessionParams, type CreateCheckoutSessionParams, type CreateCouponParams, type CreateCustomerParams, type CreateOneShotPaymentParams, type CreatePriceParams, type CreateProductParams, type CreateRefundParams, type CreateTaxRateParams, type CreateUsageRecordParams, type CreateWebhookEndpointParams, type CreditNotesListParams, type CustomerListParams, DEFAULT_RETRY_POLICY, DEFAULT_WEBHOOK_TOLERANCE_SECONDS, type EventsListParams, type IdempotencyOptions, InvalidRequestError, type ListParams, type ListResponseEnvelope, type LogContext, NOOP_LOGGER, type PaginateOptions, PermissionError, type PriceTier, type PricesListParams, RateLimitError, ResourceMissingError, type RetryPolicy, type RotateProviderCredentialParams, ServerError, type SetPortalBrandingParams, type SubscriptionsListParams, type UpdateCouponParams, type UpdateCustomerParams, type UpdateProductParams, type UpdateTaxRateParams, type UpdateWebhookEndpointParams, type UsageRecordsListParams, VERSION, type ValidateCouponParams, type VerifyWebhookOptions, type VoidInvoiceParams, WebhookVerificationError, paginate, verifyWebhookSignature };
package/dist/index.js CHANGED
@@ -460,9 +460,23 @@ var WebhookEndpoints = class extends BaseResource {
460
460
  );
461
461
  }
462
462
  /** Fetch one delivery row for inspection before deciding to redeliver. */
463
- getDelivery(endpointId, deliveryId) {
463
+ retrieveDelivery(endpointId, deliveryId) {
464
464
  return this.get(`/v1/webhook_endpoints/${endpointId}/deliveries/${deliveryId}`);
465
465
  }
466
+ /**
467
+ * @deprecated Renamed to {@link WebhookEndpoints.retrieveDelivery}.
468
+ *
469
+ * Every other single-row fetch in every BillKit SDK is `retrieve`; this
470
+ * one method was `get`, which meant reaching for the obvious name and
471
+ * getting a type error. The python and php clients already spell it
472
+ * `retrieve_delivery` / `retrieveDelivery`, so node was the outlier.
473
+ *
474
+ * Kept as an alias because removing it would break callers for a naming
475
+ * preference. It will go in the next major.
476
+ */
477
+ getDelivery(endpointId, deliveryId) {
478
+ return this.retrieveDelivery(endpointId, deliveryId);
479
+ }
466
480
  /**
467
481
  * Re-enqueue a delivery row for the dispatcher.
468
482
  *
@@ -835,7 +849,7 @@ function sleep(ms) {
835
849
  }
836
850
 
837
851
  // src/version.ts
838
- var VERSION = "0.4.0";
852
+ var VERSION = "0.5.0";
839
853
 
840
854
  // src/transport.ts
841
855
  var DEFAULT_BASE_URL = "https://api.billkit.eu";