@medipass/web-sdk 12.4.14-fix-add-types-for-payment-methods.0 → 12.4.14-fix-add-types-for-payment-methods.1

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.
@@ -1,6 +1,6 @@
1
1
  import { PAYMENT_PROVIDERS } from '@medipass/utils/constants';
2
2
  import type { MedipassRequestOpts } from '../types';
3
- import type { PaymentMethodResponse } from '../types/payment-methods';
3
+ import type { PaymentMethod, PaymentMethodResponse } from '../types/payment-methods';
4
4
  export * from '../types/payment-methods';
5
5
  /**
6
6
  * Create an account's payment method
@@ -8,14 +8,14 @@ export * from '../types/payment-methods';
8
8
  * @param {Object} opts - Additional options
9
9
  * @returns {Object} The device data
10
10
  */
11
- export declare const createAccountPaymentMethod: (accountId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
11
+ export declare const createAccountPaymentMethod: (accountId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
12
12
  /**
13
13
  * Get a business' payment methods
14
14
  * @param {String} businessId - Business ID
15
15
  * @param {Object} opts - Additional options
16
16
  * @returns {Object} The device data
17
17
  */
18
- export declare const createBusinessPaymentMethod: (businessId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
18
+ export declare const createBusinessPaymentMethod: (businessId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
19
19
  /**
20
20
  * Create a business patient payment method
21
21
  * @param {String} accountId - Account ID
@@ -23,7 +23,7 @@ export declare const createBusinessPaymentMethod: (businessId: string, nonce: st
23
23
  * @param {Object} opts - Additional options
24
24
  * @returns {Object} The device data
25
25
  */
26
- export declare const createBusinessPatientPaymentMethod: (businessId: string, patientId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
26
+ export declare const createBusinessPatientPaymentMethod: (businessId: string, patientId: string, nonce: string, source: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
27
27
  /**
28
28
  * Delete an account's payment method
29
29
  * @param {String} accountId - Account ID
@@ -55,7 +55,7 @@ export declare const deleteBusinessPatientPaymentMethod: (businessId: string, pa
55
55
  * @param {Object} opts - Additional options
56
56
  * @returns {Object} The device data
57
57
  */
58
- export declare const getAccountPaymentMethods: (accountId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
58
+ export declare const getAccountPaymentMethods: (accountId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethodResponse>;
59
59
  /**
60
60
  * Get a business' payment methods
61
61
  * @param {String} businessId - Business ID
@@ -69,7 +69,7 @@ export declare const getBusinessPaymentMethods: (businessId: string, opts?: Medi
69
69
  * @param {Object} opts - Additional options
70
70
  * @returns {Object} The payment methods data
71
71
  */
72
- export declare const getBusinessPatientPaymentMethods: (businessId: string, patientId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
72
+ export declare const getBusinessPatientPaymentMethods: (businessId: string, patientId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethodResponse>;
73
73
  /**
74
74
  * Get a business patient payment methods by ref id
75
75
  * @param {String} businessId - Business ID
@@ -77,7 +77,7 @@ export declare const getBusinessPatientPaymentMethods: (businessId: string, pati
77
77
  * @param {Object} opts - Additional options
78
78
  * @returns {Object} The payment methods data
79
79
  */
80
- export declare const getBusinessPatientPaymentMethodsByRefId: (businessId: string, refId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
80
+ export declare const getBusinessPatientPaymentMethodsByRefId: (businessId: string, refId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethodResponse>;
81
81
  /**
82
82
  * Get an account's payment method
83
83
  * @param {String} accountId - Account ID
@@ -85,7 +85,7 @@ export declare const getBusinessPatientPaymentMethodsByRefId: (businessId: strin
85
85
  * @param {Object} opts - Additional options
86
86
  * @returns {Object} The device data
87
87
  */
88
- export declare const getAccountPaymentMethod: (accountId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
88
+ export declare const getAccountPaymentMethod: (accountId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
89
89
  /**
90
90
  * Get a business payment method
91
91
  * @param {String} businessId - Business ID
@@ -93,7 +93,7 @@ export declare const getAccountPaymentMethod: (accountId: string, paymentMethodI
93
93
  * @param {Object} opts - Additional options
94
94
  * @returns {Object} The device data
95
95
  */
96
- export declare const getBusinessPaymentMethod: (businessId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
96
+ export declare const getBusinessPaymentMethod: (businessId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
97
97
  /**
98
98
  * Get a business patient payment method
99
99
  * @param {String} businessId - Business ID
@@ -102,7 +102,7 @@ export declare const getBusinessPaymentMethod: (businessId: string, paymentMetho
102
102
  * @param {Object} opts - Additional options
103
103
  * @returns {Object} The device data
104
104
  */
105
- export declare const getBusinessPatientPaymentMethod: (businessId: string, patientId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
105
+ export declare const getBusinessPatientPaymentMethod: (businessId: string, patientId: string, paymentMethodId: string, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
106
106
  interface ClientToken {
107
107
  clientToken: string;
108
108
  merchantId: string;
@@ -163,7 +163,7 @@ export declare const getClientToken: (source: string, opts?: MedipassRequestOpts
163
163
  * @param {Object} opts - Additional options
164
164
  * @returns {Object} The device data
165
165
  */
166
- export declare const updateAccountPaymentMethod: (accountId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
166
+ export declare const updateAccountPaymentMethod: (accountId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
167
167
  /**
168
168
  * Update a business' payment method
169
169
  * @param {String} businessId - Business ID
@@ -171,7 +171,7 @@ export declare const updateAccountPaymentMethod: (accountId: string, paymentMeth
171
171
  * @param {Object} opts - Additional options
172
172
  * @returns {Object} The device data
173
173
  */
174
- export declare const updateBusinessPaymentMethod: (businessId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
174
+ export declare const updateBusinessPaymentMethod: (businessId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
175
175
  /**
176
176
  * Update a business patient payment method
177
177
  * @param {String} businessId - Business ID
@@ -179,7 +179,7 @@ export declare const updateBusinessPaymentMethod: (businessId: string, paymentMe
179
179
  * @param {Object} opts - Additional options
180
180
  * @returns {Object} The device data
181
181
  */
182
- export declare const updateBusinessPatientPaymentMethod: (businessId: string, patientId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<Record<string, any>>;
182
+ export declare const updateBusinessPatientPaymentMethod: (businessId: string, patientId: string, paymentMethodId: string, body: Record<string, any>, opts?: MedipassRequestOpts) => Promise<PaymentMethod>;
183
183
  export declare const getPaymentGatewayError: (sessionResponse: Record<string, any>) => "The payment card details you entered were invalid, please review the payment card credentials and try again." | "There are issues connecting to the payment gateway. Please refresh the page and try again." | null;
184
184
  /**
185
185
  * Get a business nonce
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@medipass/web-sdk",
3
- "version": "12.4.14-fix-add-types-for-payment-methods.0",
3
+ "version": "12.4.14-fix-add-types-for-payment-methods.1",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -59,5 +59,5 @@
59
59
  "resolutions": {
60
60
  "react-scripts/**/@typescript-eslint/eslint-plugin": "5.32.0"
61
61
  },
62
- "gitHead": "168a24aebe3a3bfa21463a57bc201f825b9e14f7"
62
+ "gitHead": "a546df72b6bc2d93de8a09d10d226b1e93b1fdd7"
63
63
  }