@bcc-code/payment-client 1.0.7 → 1.0.8

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.mts CHANGED
@@ -1,3 +1,13 @@
1
+ /** Company details required for Tripletex invoice creation. */
2
+ interface InvoiceRecipientRequest {
3
+ companyName: string;
4
+ address: string;
5
+ postalCode: string;
6
+ city: string;
7
+ country: string;
8
+ vatNumber: string;
9
+ email: string;
10
+ }
1
11
  interface CreatePaymentRequest {
2
12
  payerId?: string;
3
13
  amount: number;
@@ -9,6 +19,10 @@ interface CreatePaymentRequest {
9
19
  paymentMethodDetails?: Record<string, unknown>;
10
20
  person?: PersonInfoRequest;
11
21
  lineItems?: LineItemRequest[];
22
+ /** Whether to create a Tripletex invoice when payment succeeds. */
23
+ invoiceRequested?: boolean;
24
+ /** Required when invoiceRequested is true. */
25
+ invoiceRecipient?: InvoiceRecipientRequest;
12
26
  }
13
27
  interface PersonInfoRequest {
14
28
  payerUid: string;
@@ -49,6 +63,8 @@ interface PaymentResponse {
49
63
  createdAt: string;
50
64
  updatedAt: string;
51
65
  lineItems?: LineItemResponse[];
66
+ invoiceRequested?: boolean;
67
+ tripletexInvoiceId?: string | null;
52
68
  }
53
69
  interface LineItemResponse {
54
70
  id: string;
@@ -87,6 +103,9 @@ interface PaymentReceiptResponse {
87
103
  taxAmount?: number;
88
104
  discountAmount?: number;
89
105
  amountFormatted?: string;
106
+ productName?: string;
107
+ invoiceRequested?: boolean;
108
+ tripletexInvoiceId?: string | null;
90
109
  }
91
110
  interface PaymentSucceededNotification {
92
111
  paymentId: string;
@@ -139,4 +158,4 @@ interface AdyenPaymentProps {
139
158
  onCancel?: () => void;
140
159
  }
141
160
 
142
- export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
161
+ export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
package/dist/index.d.ts CHANGED
@@ -1,3 +1,13 @@
1
+ /** Company details required for Tripletex invoice creation. */
2
+ interface InvoiceRecipientRequest {
3
+ companyName: string;
4
+ address: string;
5
+ postalCode: string;
6
+ city: string;
7
+ country: string;
8
+ vatNumber: string;
9
+ email: string;
10
+ }
1
11
  interface CreatePaymentRequest {
2
12
  payerId?: string;
3
13
  amount: number;
@@ -9,6 +19,10 @@ interface CreatePaymentRequest {
9
19
  paymentMethodDetails?: Record<string, unknown>;
10
20
  person?: PersonInfoRequest;
11
21
  lineItems?: LineItemRequest[];
22
+ /** Whether to create a Tripletex invoice when payment succeeds. */
23
+ invoiceRequested?: boolean;
24
+ /** Required when invoiceRequested is true. */
25
+ invoiceRecipient?: InvoiceRecipientRequest;
12
26
  }
13
27
  interface PersonInfoRequest {
14
28
  payerUid: string;
@@ -49,6 +63,8 @@ interface PaymentResponse {
49
63
  createdAt: string;
50
64
  updatedAt: string;
51
65
  lineItems?: LineItemResponse[];
66
+ invoiceRequested?: boolean;
67
+ tripletexInvoiceId?: string | null;
52
68
  }
53
69
  interface LineItemResponse {
54
70
  id: string;
@@ -87,6 +103,9 @@ interface PaymentReceiptResponse {
87
103
  taxAmount?: number;
88
104
  discountAmount?: number;
89
105
  amountFormatted?: string;
106
+ productName?: string;
107
+ invoiceRequested?: boolean;
108
+ tripletexInvoiceId?: string | null;
90
109
  }
91
110
  interface PaymentSucceededNotification {
92
111
  paymentId: string;
@@ -139,4 +158,4 @@ interface AdyenPaymentProps {
139
158
  onCancel?: () => void;
140
159
  }
141
160
 
142
- export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
161
+ export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bcc-code/payment-client",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "Client SDK for BCC Payment Orchestrator API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",