@billkit-eu/sdk 0.5.0 → 0.6.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
@@ -420,7 +420,7 @@ interface CreatePriceParams extends IdempotencyOptions {
420
420
  metadata?: Record<string, string>;
421
421
  trial_days?: number;
422
422
  trial_verification_cents?: number;
423
- payment_methods?: Array<"creditcard" | "directdebit" | "ideal" | "applepay" | (string & {})>;
423
+ payment_methods?: Array<"creditcard" | "directdebit" | "ideal" | "eps" | "applepay" | "paypal" | (string & {})>;
424
424
  /**
425
425
  * What a cancellation refunds without being asked. `"none"` (the default)
426
426
  * nothing; `"full"` the whole last charge; `"prorated"` the unused part
@@ -531,8 +531,14 @@ interface CreateCheckoutSessionParams extends IdempotencyOptions {
531
531
  * Pin the Mollie payment method. `undefined` lets Mollie pick from
532
532
  * the customer's available methods; when set, must be in the price's
533
533
  * `payment_methods` allowlist.
534
+ *
535
+ * Subscription-starting only, so this is deliberately NARROWER than the
536
+ * one-shot union: `bancontact` and `banktransfer` are absent because
537
+ * neither can mint the mandate a renewal needs. Mollie refuses the
538
+ * latter outright with "The payment method does not support sequence
539
+ * type".
534
540
  */
535
- method?: "creditcard" | "directdebit" | "ideal" | "applepay" | (string & {});
541
+ method?: "creditcard" | "directdebit" | "ideal" | "eps" | "applepay" | "paypal" | (string & {});
536
542
  /** Optional coupon code applied at checkout; atomically claimed. */
537
543
  coupon_code?: string;
538
544
  /**
@@ -588,8 +594,12 @@ interface CreateOneShotPaymentParams extends IdempotencyOptions {
588
594
  /**
589
595
  * Concrete Mollie method to charge with. Required, because a one-shot commits
590
596
  * up front). Validated against the tenant's capability allowlist for
591
- * `currency`; one-off methods like `bancontact`/`eps` are allowed here
592
- * even though they can't back a subscription.
597
+ * `currency`; one-off methods like `bancontact` and `banktransfer` are
598
+ * allowed here even though they can't back a subscription.
599
+ *
600
+ * `banktransfer` settles in DAYS, not seconds: the payer is handed bank
601
+ * details and Mollie holds the payment `open` for about a fortnight. Expect
602
+ * `one_shot_payment.paid` long after the call returns.
593
603
  *
594
604
  * `giropay` was removed: the scheme shut down at the end of 2024 and the
595
605
  * server now 422s it. The `(string & {})` tail keeps this open on
@@ -597,7 +607,7 @@ interface CreateOneShotPaymentParams extends IdempotencyOptions {
597
607
  * *request* type the server validates, so an SDK that lags a newly-added
598
608
  * method should not be the thing that blocks the call.
599
609
  */
600
- method: "creditcard" | "directdebit" | "ideal" | "bancontact" | "eps" | "applepay" | (string & {});
610
+ method: "creditcard" | "directdebit" | "ideal" | "bancontact" | "eps" | "applepay" | "paypal" | "banktransfer" | (string & {});
601
611
  /** Where Mollie returns the payer after the hosted checkout. */
602
612
  success_url: string;
603
613
  /** Optional page for an abandoned/cancelled payment. */
@@ -700,9 +710,18 @@ interface UpdateTaxRateParams extends IdempotencyOptions {
700
710
  inclusive?: boolean;
701
711
  active?: boolean;
702
712
  }
713
+ /**
714
+ * `auditLogs.list` params. All four filters match exactly and combine.
715
+ *
716
+ * `resource_type` narrows to a kind (`"customer"`, `"price"`);
717
+ * `resource_id` narrows to one row, which is the "everything that ever
718
+ * happened to this customer" question an audit log mostly exists for.
719
+ * Pair them or use `resource_id` alone — ids are already unique.
720
+ */
703
721
  interface AuditLogsListParams extends BaseListParams {
704
722
  action?: string;
705
723
  resource_type?: string;
724
+ resource_id?: string;
706
725
  actor_id?: string;
707
726
  }
708
727
  /**
@@ -1214,6 +1233,7 @@ declare class AuditLogs extends BaseResource {
1214
1233
  pageSize?: number;
1215
1234
  action?: string;
1216
1235
  resource_type?: string;
1236
+ resource_id?: string;
1217
1237
  actor_id?: string;
1218
1238
  }): AsyncIterableIterator<T>;
1219
1239
  }
@@ -1330,7 +1350,7 @@ declare class RateLimitError extends BillKitError {
1330
1350
  });
1331
1351
  }
1332
1352
 
1333
- declare const VERSION = "0.5.0";
1353
+ declare const VERSION = "0.6.0";
1334
1354
 
1335
1355
  /**
1336
1356
  * Verify `BillKit-Signature: t=<unix>,v1=<hex>` headers.
package/dist/index.d.ts CHANGED
@@ -420,7 +420,7 @@ interface CreatePriceParams extends IdempotencyOptions {
420
420
  metadata?: Record<string, string>;
421
421
  trial_days?: number;
422
422
  trial_verification_cents?: number;
423
- payment_methods?: Array<"creditcard" | "directdebit" | "ideal" | "applepay" | (string & {})>;
423
+ payment_methods?: Array<"creditcard" | "directdebit" | "ideal" | "eps" | "applepay" | "paypal" | (string & {})>;
424
424
  /**
425
425
  * What a cancellation refunds without being asked. `"none"` (the default)
426
426
  * nothing; `"full"` the whole last charge; `"prorated"` the unused part
@@ -531,8 +531,14 @@ interface CreateCheckoutSessionParams extends IdempotencyOptions {
531
531
  * Pin the Mollie payment method. `undefined` lets Mollie pick from
532
532
  * the customer's available methods; when set, must be in the price's
533
533
  * `payment_methods` allowlist.
534
+ *
535
+ * Subscription-starting only, so this is deliberately NARROWER than the
536
+ * one-shot union: `bancontact` and `banktransfer` are absent because
537
+ * neither can mint the mandate a renewal needs. Mollie refuses the
538
+ * latter outright with "The payment method does not support sequence
539
+ * type".
534
540
  */
535
- method?: "creditcard" | "directdebit" | "ideal" | "applepay" | (string & {});
541
+ method?: "creditcard" | "directdebit" | "ideal" | "eps" | "applepay" | "paypal" | (string & {});
536
542
  /** Optional coupon code applied at checkout; atomically claimed. */
537
543
  coupon_code?: string;
538
544
  /**
@@ -588,8 +594,12 @@ interface CreateOneShotPaymentParams extends IdempotencyOptions {
588
594
  /**
589
595
  * Concrete Mollie method to charge with. Required, because a one-shot commits
590
596
  * up front). Validated against the tenant's capability allowlist for
591
- * `currency`; one-off methods like `bancontact`/`eps` are allowed here
592
- * even though they can't back a subscription.
597
+ * `currency`; one-off methods like `bancontact` and `banktransfer` are
598
+ * allowed here even though they can't back a subscription.
599
+ *
600
+ * `banktransfer` settles in DAYS, not seconds: the payer is handed bank
601
+ * details and Mollie holds the payment `open` for about a fortnight. Expect
602
+ * `one_shot_payment.paid` long after the call returns.
593
603
  *
594
604
  * `giropay` was removed: the scheme shut down at the end of 2024 and the
595
605
  * server now 422s it. The `(string & {})` tail keeps this open on
@@ -597,7 +607,7 @@ interface CreateOneShotPaymentParams extends IdempotencyOptions {
597
607
  * *request* type the server validates, so an SDK that lags a newly-added
598
608
  * method should not be the thing that blocks the call.
599
609
  */
600
- method: "creditcard" | "directdebit" | "ideal" | "bancontact" | "eps" | "applepay" | (string & {});
610
+ method: "creditcard" | "directdebit" | "ideal" | "bancontact" | "eps" | "applepay" | "paypal" | "banktransfer" | (string & {});
601
611
  /** Where Mollie returns the payer after the hosted checkout. */
602
612
  success_url: string;
603
613
  /** Optional page for an abandoned/cancelled payment. */
@@ -700,9 +710,18 @@ interface UpdateTaxRateParams extends IdempotencyOptions {
700
710
  inclusive?: boolean;
701
711
  active?: boolean;
702
712
  }
713
+ /**
714
+ * `auditLogs.list` params. All four filters match exactly and combine.
715
+ *
716
+ * `resource_type` narrows to a kind (`"customer"`, `"price"`);
717
+ * `resource_id` narrows to one row, which is the "everything that ever
718
+ * happened to this customer" question an audit log mostly exists for.
719
+ * Pair them or use `resource_id` alone — ids are already unique.
720
+ */
703
721
  interface AuditLogsListParams extends BaseListParams {
704
722
  action?: string;
705
723
  resource_type?: string;
724
+ resource_id?: string;
706
725
  actor_id?: string;
707
726
  }
708
727
  /**
@@ -1214,6 +1233,7 @@ declare class AuditLogs extends BaseResource {
1214
1233
  pageSize?: number;
1215
1234
  action?: string;
1216
1235
  resource_type?: string;
1236
+ resource_id?: string;
1217
1237
  actor_id?: string;
1218
1238
  }): AsyncIterableIterator<T>;
1219
1239
  }
@@ -1330,7 +1350,7 @@ declare class RateLimitError extends BillKitError {
1330
1350
  });
1331
1351
  }
1332
1352
 
1333
- declare const VERSION = "0.5.0";
1353
+ declare const VERSION = "0.6.0";
1334
1354
 
1335
1355
  /**
1336
1356
  * Verify `BillKit-Signature: t=<unix>,v1=<hex>` headers.
package/dist/index.js CHANGED
@@ -686,6 +686,7 @@ var AuditLogs = class extends BaseResource {
686
686
  filters: {
687
687
  action: options.action,
688
688
  resource_type: options.resource_type,
689
+ resource_id: options.resource_id,
689
690
  actor_id: options.actor_id
690
691
  }
691
692
  });
@@ -849,7 +850,7 @@ function sleep(ms) {
849
850
  }
850
851
 
851
852
  // src/version.ts
852
- var VERSION = "0.5.0";
853
+ var VERSION = "0.6.0";
853
854
 
854
855
  // src/transport.ts
855
856
  var DEFAULT_BASE_URL = "https://api.billkit.eu";