@bcc-code/payment-client 1.2.5 → 1.2.6
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 +20 -2
- package/dist/index.d.ts +20 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -129,6 +129,24 @@ interface GetPaymentMethodsOptions {
|
|
|
129
129
|
churchId?: string;
|
|
130
130
|
isCompany?: boolean;
|
|
131
131
|
}
|
|
132
|
+
/** A single provider's available methods from the configuration API. */
|
|
133
|
+
interface PaymentProviderMethods {
|
|
134
|
+
provider: string;
|
|
135
|
+
environment: string;
|
|
136
|
+
countryCode: string | null;
|
|
137
|
+
methods: string[];
|
|
138
|
+
}
|
|
139
|
+
/** Response from GET /api/v1/configuration/payment-methods. */
|
|
140
|
+
interface PaymentMethodsConfigResponse {
|
|
141
|
+
tenantId: string;
|
|
142
|
+
currency: string;
|
|
143
|
+
amount: number;
|
|
144
|
+
countryCode: string | null;
|
|
145
|
+
churchId: string | null;
|
|
146
|
+
payerType: string;
|
|
147
|
+
paymentMethods: Record<string, PaymentProviderMethods>;
|
|
148
|
+
timestamp: string;
|
|
149
|
+
}
|
|
132
150
|
|
|
133
151
|
interface PaymentClientOptions {
|
|
134
152
|
baseUrl: string;
|
|
@@ -147,7 +165,7 @@ declare class PaymentClient {
|
|
|
147
165
|
getPayment(paymentId: string): Promise<PaymentResponse | null>;
|
|
148
166
|
getReceipt(paymentId: string): Promise<PaymentReceiptResponse | null>;
|
|
149
167
|
getTotalAmountByPrefix(prefix: string): Promise<number>;
|
|
150
|
-
getPaymentMethods(options?: GetPaymentMethodsOptions): Promise<
|
|
168
|
+
getPaymentMethods(options?: GetPaymentMethodsOptions): Promise<PaymentMethodsConfigResponse>;
|
|
151
169
|
}
|
|
152
170
|
|
|
153
171
|
interface StripePaymentProps {
|
|
@@ -173,4 +191,4 @@ interface AdyenPaymentProps {
|
|
|
173
191
|
onCancel?: () => void;
|
|
174
192
|
}
|
|
175
193
|
|
|
176
|
-
export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type GetPaymentMethodsOptions, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
|
|
194
|
+
export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type GetPaymentMethodsOptions, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentMethodsConfigResponse, type PaymentProviderMethods, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
|
package/dist/index.d.ts
CHANGED
|
@@ -129,6 +129,24 @@ interface GetPaymentMethodsOptions {
|
|
|
129
129
|
churchId?: string;
|
|
130
130
|
isCompany?: boolean;
|
|
131
131
|
}
|
|
132
|
+
/** A single provider's available methods from the configuration API. */
|
|
133
|
+
interface PaymentProviderMethods {
|
|
134
|
+
provider: string;
|
|
135
|
+
environment: string;
|
|
136
|
+
countryCode: string | null;
|
|
137
|
+
methods: string[];
|
|
138
|
+
}
|
|
139
|
+
/** Response from GET /api/v1/configuration/payment-methods. */
|
|
140
|
+
interface PaymentMethodsConfigResponse {
|
|
141
|
+
tenantId: string;
|
|
142
|
+
currency: string;
|
|
143
|
+
amount: number;
|
|
144
|
+
countryCode: string | null;
|
|
145
|
+
churchId: string | null;
|
|
146
|
+
payerType: string;
|
|
147
|
+
paymentMethods: Record<string, PaymentProviderMethods>;
|
|
148
|
+
timestamp: string;
|
|
149
|
+
}
|
|
132
150
|
|
|
133
151
|
interface PaymentClientOptions {
|
|
134
152
|
baseUrl: string;
|
|
@@ -147,7 +165,7 @@ declare class PaymentClient {
|
|
|
147
165
|
getPayment(paymentId: string): Promise<PaymentResponse | null>;
|
|
148
166
|
getReceipt(paymentId: string): Promise<PaymentReceiptResponse | null>;
|
|
149
167
|
getTotalAmountByPrefix(prefix: string): Promise<number>;
|
|
150
|
-
getPaymentMethods(options?: GetPaymentMethodsOptions): Promise<
|
|
168
|
+
getPaymentMethods(options?: GetPaymentMethodsOptions): Promise<PaymentMethodsConfigResponse>;
|
|
151
169
|
}
|
|
152
170
|
|
|
153
171
|
interface StripePaymentProps {
|
|
@@ -173,4 +191,4 @@ interface AdyenPaymentProps {
|
|
|
173
191
|
onCancel?: () => void;
|
|
174
192
|
}
|
|
175
193
|
|
|
176
|
-
export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type GetPaymentMethodsOptions, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
|
|
194
|
+
export { type AdyenPaymentProps, type CreatePaymentRequest, type CreatePaymentResponse, type GetPaymentMethodsOptions, type InvoiceRecipientRequest, type LineItemRequest, type LineItemResponse, PaymentClient, type PaymentClientOptions, type PaymentMethodsConfigResponse, type PaymentProviderMethods, type PaymentReceiptResponse, type PaymentResponse, type PaymentSucceededNotification, type PersonInfoRequest, type StripePaymentProps };
|