@bigbinary/neeto-payments-frontend 1.5.0 → 1.6.0-beta2
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/AccountsDashboard.js +12 -7
- package/dist/AccountsDashboard.js.map +1 -1
- package/dist/Dashboard.js +10 -9
- package/dist/Dashboard.js.map +1 -1
- package/dist/{ExportModal-a00544db.js → ExportModal-85725c35.js} +7 -5
- package/dist/ExportModal-85725c35.js.map +1 -0
- package/dist/PayoutsDashboard.js +9 -8
- package/dist/PayoutsDashboard.js.map +1 -1
- package/dist/PayoutsPage.js +10 -9
- package/dist/PayoutsPage.js.map +1 -1
- package/dist/RazorpayDashboard.js +18 -13
- package/dist/RazorpayDashboard.js.map +1 -1
- package/dist/RazorpayPaymentButton.js +6 -3
- package/dist/RazorpayPaymentButton.js.map +1 -1
- package/dist/StripeConnect.js +8 -4
- package/dist/StripeConnect.js.map +1 -1
- package/dist/U2TDTBMY-c464dc98.js +12081 -0
- package/dist/U2TDTBMY-c464dc98.js.map +1 -0
- package/dist/UpiMarkAsPaidButton.js +5 -2
- package/dist/UpiMarkAsPaidButton.js.map +1 -1
- package/dist/UpiPayment.js +5 -2
- package/dist/UpiPayment.js.map +1 -1
- package/dist/V2PaymentsDashboard.js +11 -7
- package/dist/V2PaymentsDashboard.js.map +1 -1
- package/dist/cjs/AccountsDashboard.js +12 -7
- package/dist/cjs/AccountsDashboard.js.map +1 -1
- package/dist/cjs/Dashboard.js +10 -9
- package/dist/cjs/Dashboard.js.map +1 -1
- package/dist/cjs/{ExportModal-408e0ed8.js → ExportModal-20f368a1.js} +7 -5
- package/dist/cjs/ExportModal-20f368a1.js.map +1 -0
- package/dist/cjs/PayoutsDashboard.js +9 -8
- package/dist/cjs/PayoutsDashboard.js.map +1 -1
- package/dist/cjs/PayoutsPage.js +10 -9
- package/dist/cjs/PayoutsPage.js.map +1 -1
- package/dist/cjs/RazorpayDashboard.js +18 -13
- package/dist/cjs/RazorpayDashboard.js.map +1 -1
- package/dist/cjs/RazorpayPaymentButton.js +6 -3
- package/dist/cjs/RazorpayPaymentButton.js.map +1 -1
- package/dist/cjs/StripeConnect.js +8 -4
- package/dist/cjs/StripeConnect.js.map +1 -1
- package/dist/cjs/U2TDTBMY-e2fad970.js +12083 -0
- package/dist/cjs/U2TDTBMY-e2fad970.js.map +1 -0
- package/dist/cjs/UpiMarkAsPaidButton.js +5 -2
- package/dist/cjs/UpiMarkAsPaidButton.js.map +1 -1
- package/dist/cjs/UpiPayment.js +5 -2
- package/dist/cjs/UpiPayment.js.map +1 -1
- package/dist/cjs/V2PaymentsDashboard.js +11 -7
- package/dist/cjs/V2PaymentsDashboard.js.map +1 -1
- package/dist/cjs/{exportChannel-e4cc2bb1.js → exportChannel-7bd80952.js} +5 -3
- package/dist/cjs/exportChannel-7bd80952.js.map +1 -0
- package/dist/cjs/index.js +13 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/mutation-ed7b84fc.js +235 -0
- package/dist/cjs/mutation-ed7b84fc.js.map +1 -0
- package/dist/cjs/queryConstants-de21eed5.js +944 -0
- package/dist/cjs/queryConstants-de21eed5.js.map +1 -0
- package/dist/cjs/renderFunctions-398d3fb5.js +3719 -0
- package/dist/cjs/renderFunctions-398d3fb5.js.map +1 -0
- package/dist/cjs/{useConnectApi-f248a942.js → useConnectApi-f0665633.js} +35 -16
- package/dist/cjs/{useConnectApi-f248a942.js.map → useConnectApi-f0665633.js.map} +1 -1
- package/dist/cjs/{useFiltersAndPagination-4ab52847.js → useFiltersAndPagination-312c0331.js} +2 -2
- package/dist/cjs/{useFiltersAndPagination-4ab52847.js.map → useFiltersAndPagination-312c0331.js.map} +1 -1
- package/dist/cjs/useMutation-4c7cdbe1.js +154 -0
- package/dist/cjs/useMutation-4c7cdbe1.js.map +1 -0
- package/dist/cjs/{usePaymentApi-8ef50777.js → usePaymentApi-ae70e5df.js} +15 -8
- package/dist/cjs/usePaymentApi-ae70e5df.js.map +1 -0
- package/dist/cjs/{usePaymentsApi-5eba9184.js → usePaymentsApi-815be3da.js} +10 -4
- package/dist/cjs/usePaymentsApi-815be3da.js.map +1 -0
- package/dist/cjs/{usePlatformApi-4eca1acd.js → usePlatformApi-830827fa.js} +38 -11
- package/dist/cjs/usePlatformApi-830827fa.js.map +1 -0
- package/dist/cjs/useRazorpayPayment.js +7 -3
- package/dist/cjs/useRazorpayPayment.js.map +1 -1
- package/dist/cjs/utils-7eba34a4.js +664 -0
- package/dist/cjs/utils-7eba34a4.js.map +1 -0
- package/dist/{exportChannel-e0822151.js → exportChannel-250e6f14.js} +5 -3
- package/dist/exportChannel-250e6f14.js.map +1 -0
- package/dist/index.js +13 -12
- package/dist/index.js.map +1 -1
- package/dist/mutation-286611ef.js +232 -0
- package/dist/mutation-286611ef.js.map +1 -0
- package/dist/queryConstants-765c8816.js +920 -0
- package/dist/queryConstants-765c8816.js.map +1 -0
- package/dist/renderFunctions-97b121a4.js +3633 -0
- package/dist/renderFunctions-97b121a4.js.map +1 -0
- package/dist/{useConnectApi-f74b7a05.js → useConnectApi-87335bf6.js} +35 -16
- package/dist/{useConnectApi-f74b7a05.js.map → useConnectApi-87335bf6.js.map} +1 -1
- package/dist/{useFiltersAndPagination-ad2d332e.js → useFiltersAndPagination-2ab7bc8f.js} +2 -2
- package/dist/{useFiltersAndPagination-ad2d332e.js.map → useFiltersAndPagination-2ab7bc8f.js.map} +1 -1
- package/dist/useMutation-8d67f853.js +132 -0
- package/dist/useMutation-8d67f853.js.map +1 -0
- package/dist/{usePaymentApi-04ce2d23.js → usePaymentApi-12737871.js} +15 -8
- package/dist/usePaymentApi-12737871.js.map +1 -0
- package/dist/{usePaymentsApi-c1c0e6ab.js → usePaymentsApi-a801ab15.js} +10 -4
- package/dist/usePaymentsApi-a801ab15.js.map +1 -0
- package/dist/{usePlatformApi-c3fc984a.js → usePlatformApi-8adc2a50.js} +38 -11
- package/dist/usePlatformApi-8adc2a50.js.map +1 -0
- package/dist/useRazorpayPayment.js +7 -3
- package/dist/useRazorpayPayment.js.map +1 -1
- package/dist/utils-e29db9c9.js +614 -0
- package/dist/utils-e29db9c9.js.map +1 -0
- package/package.json +3 -3
- package/dist/ExportModal-a00544db.js.map +0 -1
- package/dist/cjs/ExportModal-408e0ed8.js.map +0 -1
- package/dist/cjs/exportChannel-e4cc2bb1.js.map +0 -1
- package/dist/cjs/queryConstants-45f84f3e.js +0 -23
- package/dist/cjs/queryConstants-45f84f3e.js.map +0 -1
- package/dist/cjs/renderFunctions-5e706b7a.js +0 -168
- package/dist/cjs/renderFunctions-5e706b7a.js.map +0 -1
- package/dist/cjs/usePaymentApi-8ef50777.js.map +0 -1
- package/dist/cjs/usePaymentsApi-5eba9184.js.map +0 -1
- package/dist/cjs/usePlatformApi-4eca1acd.js.map +0 -1
- package/dist/exportChannel-e0822151.js.map +0 -1
- package/dist/queryConstants-7d91832f.js +0 -21
- package/dist/queryConstants-7d91832f.js.map +0 -1
- package/dist/renderFunctions-5f829290.js +0 -147
- package/dist/renderFunctions-5f829290.js.map +0 -1
- package/dist/usePaymentApi-04ce2d23.js.map +0 -1
- package/dist/usePaymentsApi-c1c0e6ab.js.map +0 -1
- package/dist/usePlatformApi-c3fc984a.js.map +0 -1
|
@@ -1,10 +1,9 @@
|
|
|
1
|
+
import { u as useQuery, Q as QUERY_KEYS } from './queryConstants-765c8816.js';
|
|
1
2
|
import { isPresent } from '@bigbinary/neeto-cist';
|
|
2
3
|
import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
|
|
3
|
-
import { useQuery } from 'react-query';
|
|
4
4
|
import axios from 'axios';
|
|
5
5
|
import { BASE_URL } from './constants.js';
|
|
6
6
|
import require$$0 from 'util';
|
|
7
|
-
import { Q as QUERY_KEYS } from './queryConstants-7d91832f.js';
|
|
8
7
|
|
|
9
8
|
const show$1 = holdableId => axios.get(`${BASE_URL}/api/v1/stripe/holdable/${holdableId}/account`);
|
|
10
9
|
const create = payload => axios.post(`${BASE_URL}/api/v1/stripe/accounts`, payload);
|
|
@@ -2099,36 +2098,56 @@ const transactionsApi = {
|
|
|
2099
2098
|
|
|
2100
2099
|
const useFetchConnectedStripeAccount = function (holdableId) {
|
|
2101
2100
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2102
|
-
return useQuery(
|
|
2101
|
+
return useQuery({
|
|
2102
|
+
queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],
|
|
2103
|
+
queryFn: () => accountsApi.show(holdableId),
|
|
2104
|
+
...options
|
|
2105
|
+
});
|
|
2103
2106
|
};
|
|
2104
2107
|
const useFetchStripeTransactions = function () {
|
|
2105
2108
|
let holdableId = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "";
|
|
2106
2109
|
let payload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2107
2110
|
let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
2108
|
-
return useQuery(
|
|
2109
|
-
|
|
2110
|
-
|
|
2111
|
-
|
|
2112
|
-
|
|
2113
|
-
|
|
2111
|
+
return useQuery({
|
|
2112
|
+
queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],
|
|
2113
|
+
queryFn: () => {
|
|
2114
|
+
if (isPresent(holdableId)) {
|
|
2115
|
+
return transactionsApi.list(holdableId, payload);
|
|
2116
|
+
}
|
|
2117
|
+
return transactionsApi.defaultList(payload);
|
|
2118
|
+
},
|
|
2119
|
+
...options
|
|
2120
|
+
});
|
|
2114
2121
|
};
|
|
2115
2122
|
const useFetchStripePayouts = function (payload) {
|
|
2116
2123
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2117
|
-
return useQuery(
|
|
2124
|
+
return useQuery({
|
|
2125
|
+
queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],
|
|
2126
|
+
queryFn: () => payoutsApi.list(payload),
|
|
2127
|
+
...options
|
|
2128
|
+
});
|
|
2118
2129
|
};
|
|
2119
2130
|
const useShowStripePayout = function (id) {
|
|
2120
2131
|
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2121
|
-
return useQuery(
|
|
2132
|
+
return useQuery({
|
|
2133
|
+
queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],
|
|
2134
|
+
queryFn: () => payoutsApi.show(id),
|
|
2135
|
+
...options
|
|
2136
|
+
});
|
|
2122
2137
|
};
|
|
2123
2138
|
const usePollingStripeAccount = (holdableId, _ref) => {
|
|
2124
2139
|
let {
|
|
2125
2140
|
refetchInterval
|
|
2126
2141
|
} = _ref;
|
|
2127
|
-
return useQuery(
|
|
2142
|
+
return useQuery({
|
|
2143
|
+
queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],
|
|
2144
|
+
queryFn: () => accountsApi.show(holdableId),
|
|
2128
2145
|
refetchInterval
|
|
2129
2146
|
});
|
|
2130
2147
|
};
|
|
2131
|
-
const usePollingStripeAccountCreationStatus = (jobId, options) => useQuery(
|
|
2148
|
+
const usePollingStripeAccountCreationStatus = (jobId, options) => useQuery({
|
|
2149
|
+
queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],
|
|
2150
|
+
queryFn: () => accountsApi.creationStatus(jobId),
|
|
2132
2151
|
...options
|
|
2133
2152
|
});
|
|
2134
2153
|
const useDestroyStripeAccount = _ref2 => {
|
|
@@ -2137,7 +2156,7 @@ const useDestroyStripeAccount = _ref2 => {
|
|
|
2137
2156
|
holdableId
|
|
2138
2157
|
} = _ref2;
|
|
2139
2158
|
return useMutationWithInvalidation(accountsApi.destroy, {
|
|
2140
|
-
keysToInvalidate: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId]],
|
|
2159
|
+
keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS], [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId]],
|
|
2141
2160
|
onSuccess
|
|
2142
2161
|
});
|
|
2143
2162
|
};
|
|
@@ -2146,10 +2165,10 @@ const useCreateStripeAccount = _ref3 => {
|
|
|
2146
2165
|
onSuccess
|
|
2147
2166
|
} = _ref3;
|
|
2148
2167
|
return useMutationWithInvalidation(accountsApi.create, {
|
|
2149
|
-
keysToInvalidate: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],
|
|
2168
|
+
keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],
|
|
2150
2169
|
onSuccess
|
|
2151
2170
|
});
|
|
2152
2171
|
};
|
|
2153
2172
|
|
|
2154
2173
|
export { useFetchConnectedStripeAccount as a, useFetchStripePayouts as b, useShowStripePayout as c, useCreateStripeAccount as d, usePollingStripeAccountCreationStatus as e, useDestroyStripeAccount as f, usePollingStripeAccount as g, qs as q, useFetchStripeTransactions as u };
|
|
2155
|
-
//# sourceMappingURL=useConnectApi-
|
|
2174
|
+
//# sourceMappingURL=useConnectApi-87335bf6.js.map
|