@paynl/payparts-types 1.4.0-alpha.95 → 1.27.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.
@@ -53,6 +53,7 @@ export interface PaymentMethodContext {
53
53
  returnUrl: string;
54
54
  threeDs?: ThreeDsData;
55
55
  transaction?: TransactionData;
56
+ orderStatus?: OrderPaymentStatus;
56
57
  }) => void;
57
58
  onPartialPaid?: (data: PartialPaymentEventData) => void;
58
59
  onInfoUpdated?: (data: InfoUpdatedEvent['data']) => void;
@@ -207,6 +208,10 @@ export interface CheckoutConfig {
207
208
  };
208
209
  customer?: CustomerInfo;
209
210
  order?: OrderInfo;
211
+ lastUsedMethodId?: number;
212
+ lastUsedSubMethodId?: number;
213
+ lastUsedBankAccountNumber?: string;
214
+ lastUsedEnabled?: boolean;
210
215
  payments?: SessionPaymentInfo[];
211
216
  capturedAmount?: AmountDto;
212
217
  authorizedAmount?: AmountDto;
@@ -257,6 +262,7 @@ export interface PaymentSuccessEventData {
257
262
  returnUrl?: string;
258
263
  threeDs?: ThreeDsData;
259
264
  transaction?: TransactionData;
265
+ orderStatus?: OrderPaymentStatus;
260
266
  }
261
267
  export interface PartialPaymentEventData {
262
268
  orderId: string;
@@ -365,7 +371,7 @@ export interface PaymentStatusInfo {
365
371
  export interface PaymentSuccessEvent {
366
372
  orderId: string;
367
373
  returnUrl: string;
368
- paymentStatus?: PaymentStatusInfo;
374
+ paymentStatus: OrderPaymentStatus | undefined;
369
375
  resolve: () => void;
370
376
  reject: (error: Error) => void;
371
377
  }
@@ -646,6 +652,10 @@ export interface InitOptions {
646
652
  * Debug mode - shows disabled/hidden payment methods with min/max amounts.
647
653
  */
648
654
  debugMode?: boolean;
655
+ /**
656
+ * When enabled, the customer's last used payment method is promoted to the top of the list.
657
+ */
658
+ lastUsedEnabled?: boolean;
649
659
  /**
650
660
  * Custom translations to override or extend default translations.
651
661
  */
@@ -654,7 +664,7 @@ export interface InitOptions {
654
664
  /** @deprecated Use ApplePayOptions instead */
655
665
  export type ApplePayConfig = ApplePayOptions;
656
666
  export type PayPartsSDK = {
657
- init: (opt: InitOptions) => void;
667
+ init: (opt: InitOptions) => Promise<Checkout>;
658
668
  mount: (options: MountOptions) => MountResult;
659
669
  create: (options: CheckoutConfig) => MountResult;
660
670
  prepare: (_methodOrSection: string) => PaymentComponent;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paynl/payparts-types",
3
- "version": "1.4.0-alpha.95",
3
+ "version": "1.27.0",
4
4
  "description": "TypeScript type definitions for the PayParts payment SDK",
5
5
  "type": "module",
6
6
  "types": "./dist/index.d.ts",