@bigbinary/neeto-payments-frontend 3.3.48 → 4.0.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.
Files changed (63) hide show
  1. package/README.md +2 -2
  2. package/dist/AccountsDashboard.js +1 -1
  3. package/dist/CustomerCancelRecurringPaymentForm.js +1 -1
  4. package/dist/ManualUpiConnect.js +256 -0
  5. package/dist/ManualUpiConnect.js.map +1 -0
  6. package/dist/{UpiPayment.js → ManualUpiPayment.js} +6 -4
  7. package/dist/ManualUpiPayment.js.map +1 -0
  8. package/dist/ManualUpiPaymentConfirmButton.js +7 -30
  9. package/dist/ManualUpiPaymentConfirmButton.js.map +1 -1
  10. package/dist/PaymentsDashboard.js +1 -1
  11. package/dist/PayoutsDashboard.js +2 -2
  12. package/dist/PayoutsPage.js +2 -2
  13. package/dist/RecurringPaymentSettings.js +1 -1
  14. package/dist/RefundsDashboard.js +1 -1
  15. package/dist/SplitTransfersDashboard.js +1 -1
  16. package/dist/TaxesDashboard.js +1 -1
  17. package/dist/cjs/AccountsDashboard.js +1 -1
  18. package/dist/cjs/CustomerCancelRecurringPaymentForm.js +1 -1
  19. package/dist/cjs/ManualUpiConnect.js +277 -0
  20. package/dist/cjs/ManualUpiConnect.js.map +1 -0
  21. package/dist/cjs/{UpiPayment.js → ManualUpiPayment.js} +7 -5
  22. package/dist/cjs/ManualUpiPayment.js.map +1 -0
  23. package/dist/cjs/ManualUpiPaymentConfirmButton.js +8 -31
  24. package/dist/cjs/ManualUpiPaymentConfirmButton.js.map +1 -1
  25. package/dist/cjs/PaymentsDashboard.js +1 -1
  26. package/dist/cjs/PayoutsDashboard.js +2 -2
  27. package/dist/cjs/PayoutsPage.js +2 -2
  28. package/dist/cjs/RecurringPaymentSettings.js +1 -1
  29. package/dist/cjs/RefundsDashboard.js +1 -1
  30. package/dist/cjs/SplitTransfersDashboard.js +1 -1
  31. package/dist/cjs/TaxesDashboard.js +1 -1
  32. package/dist/cjs/index.js +12 -14
  33. package/dist/cjs/index.js.map +1 -1
  34. package/dist/cjs/{queryConstants-DGg4cX3r.js → queryConstants-D2ARfy8-.js} +3 -2
  35. package/dist/cjs/queryConstants-D2ARfy8-.js.map +1 -0
  36. package/dist/cjs/{usePaymentsApi-BulmZ4H9.js → usePaymentApi-CMOLq2VR.js} +26 -12
  37. package/dist/cjs/usePaymentApi-CMOLq2VR.js.map +1 -0
  38. package/dist/cjs/{usePlatformApi-C1-u-hze.js → usePlatformApi-CmetBzFR.js} +2 -2
  39. package/dist/cjs/{usePlatformApi-C1-u-hze.js.map → usePlatformApi-CmetBzFR.js.map} +1 -1
  40. package/dist/index.js +10 -11
  41. package/dist/index.js.map +1 -1
  42. package/dist/{queryConstants-mgjK5Hgk.js → queryConstants-jobxv6K1.js} +3 -2
  43. package/dist/queryConstants-jobxv6K1.js.map +1 -0
  44. package/dist/usePaymentApi-CditWIud.js +52 -0
  45. package/dist/usePaymentApi-CditWIud.js.map +1 -0
  46. package/dist/{usePlatformApi-Ca-CVxhW.js → usePlatformApi-CvRR6Wi5.js} +2 -2
  47. package/dist/{usePlatformApi-Ca-CVxhW.js.map → usePlatformApi-CvRR6Wi5.js.map} +1 -1
  48. package/package.json +5 -5
  49. package/dist/ConfirmUpiPaymentButton.js +0 -155
  50. package/dist/ConfirmUpiPaymentButton.js.map +0 -1
  51. package/dist/UpiConnect.js +0 -171
  52. package/dist/UpiConnect.js.map +0 -1
  53. package/dist/UpiPayment.js.map +0 -1
  54. package/dist/cjs/ConfirmUpiPaymentButton.js +0 -176
  55. package/dist/cjs/ConfirmUpiPaymentButton.js.map +0 -1
  56. package/dist/cjs/UpiConnect.js +0 -192
  57. package/dist/cjs/UpiConnect.js.map +0 -1
  58. package/dist/cjs/UpiPayment.js.map +0 -1
  59. package/dist/cjs/queryConstants-DGg4cX3r.js.map +0 -1
  60. package/dist/cjs/usePaymentsApi-BulmZ4H9.js.map +0 -1
  61. package/dist/queryConstants-mgjK5Hgk.js.map +0 -1
  62. package/dist/usePaymentsApi-BWiIWIWh.js +0 -38
  63. package/dist/usePaymentsApi-BWiIWIWh.js.map +0 -1
package/dist/cjs/index.js CHANGED
@@ -4,8 +4,8 @@ var AccountsDashboard = require('./AccountsDashboard.js');
4
4
  var AdminCancelRecurringPaymentButton = require('./AdminCancelRecurringPaymentButton.js');
5
5
  var CashPaymentButton = require('./CashPaymentButton.js');
6
6
  var ConfirmCashPaymentButton = require('./ConfirmCashPaymentButton.js');
7
- var ConfirmUpiPaymentButton = require('./ConfirmUpiPaymentButton.js');
8
7
  var CustomerCancelRecurringPaymentForm = require('./CustomerCancelRecurringPaymentForm.js');
8
+ var ManualUpiConnect = require('./ManualUpiConnect.js');
9
9
  var ManualUpiPaymentConfirmButton = require('./ManualUpiPaymentConfirmButton.js');
10
10
  var PaymentKindRestrictionAlert = require('./PaymentKindRestrictionAlert.js');
11
11
  var PaymentsDashboard = require('./PaymentsDashboard.js');
@@ -16,8 +16,7 @@ var RecurringPaymentSettings = require('./RecurringPaymentSettings.js');
16
16
  var RefundsDashboard = require('./RefundsDashboard.js');
17
17
  var SplitTransfersDashboard = require('./SplitTransfersDashboard.js');
18
18
  var TaxesDashboard = require('./TaxesDashboard.js');
19
- var UpiConnect = require('./UpiConnect.js');
20
- var UpiPayment = require('./UpiPayment.js');
19
+ var ManualUpiPayment = require('./ManualUpiPayment.js');
21
20
  var useRazorpayPayment = require('./useRazorpayPayment.js');
22
21
  var useStripePromise = require('./useStripePromise.js');
23
22
  var constants = require('./index-RKMq21yy.js');
@@ -59,34 +58,34 @@ require('@bigbinary/neeto-molecules/TableWrapper');
59
58
  require('@bigbinary/neetoui/Table');
60
59
  require('@bigbinary/neetoui/NoData');
61
60
  require('@bigbinary/neetoui/Spinner');
62
- require('./queryConstants-DGg4cX3r.js');
61
+ require('./queryConstants-D2ARfy8-.js');
63
62
  require('@bigbinary/neetoui/Alert');
64
63
  require('./usePaymentApi-D9rbv9km.js');
65
64
  require('@bigbinary/neetoui/formik/Form');
66
65
  require('@bigbinary/neetoui/formik/Textarea');
67
66
  require('@bigbinary/neetoui/formik/ActionBlock');
68
- require('@bigbinary/neetoui/formik/Select');
69
- require('./usePaymentsApi-BulmZ4H9.js');
70
- require('yup');
71
67
  require('@bigbinary/neetoui/formik/Button');
68
+ require('@bigbinary/neeto-molecules/CardLayout');
69
+ require('@bigbinary/neetoui/formik/Input');
70
+ require('yup');
71
+ require('@bigbinary/neeto-molecules/MoreDropdown');
72
+ require('@bigbinary/neetoui/formik/Select');
73
+ require('./usePaymentApi-CMOLq2VR.js');
72
74
  require('@babel/runtime/helpers/objectWithoutProperties');
73
75
  require('./ExportModal-GI2FElh3.js');
74
- require('./usePlatformApi-C1-u-hze.js');
76
+ require('./usePlatformApi-CmetBzFR.js');
75
77
  require('qs');
76
78
  require('react-router-dom/cjs/react-router-dom');
77
79
  require('@babel/runtime/helpers/asyncToGenerator');
78
80
  require('@babel/runtime/regenerator');
79
81
  require('./usePaymentApi-DU3yYSX5.js');
80
- require('@bigbinary/neeto-molecules/CardLayout');
81
82
  require('@bigbinary/neeto-molecules/Container');
82
- require('@bigbinary/neetoui/formik/Input');
83
83
  require('@bigbinary/neeto-molecules/HelpPopover');
84
84
  require('@bigbinary/neetoui/Pane');
85
85
  require('@bigbinary/neetoui/Dropdown');
86
86
  require('@bigbinary/neeto-molecules/PageLoader');
87
87
  require('@bigbinary/neetoui/Label');
88
88
  require('@bigbinary/neetoui/formik/Radio');
89
- require('@bigbinary/neeto-molecules/MoreDropdown');
90
89
  require('qrcode.react');
91
90
  require('@bigbinary/neeto-commons-frontend/initializers');
92
91
  require('decimal.js');
@@ -98,8 +97,8 @@ exports.AccountsDashboard = AccountsDashboard;
98
97
  exports.AdminCancelRecurringPaymentButton = AdminCancelRecurringPaymentButton;
99
98
  exports.CashPaymentButton = CashPaymentButton;
100
99
  exports.ConfirmCashPaymentButton = ConfirmCashPaymentButton;
101
- exports.ConfirmUpiPaymentButton = ConfirmUpiPaymentButton;
102
100
  exports.CustomerCancelRecurringPaymentForm = CustomerCancelRecurringPaymentForm;
101
+ exports.ManualUpiConnect = ManualUpiConnect;
103
102
  exports.ManualUpiPaymentConfirmButton = ManualUpiPaymentConfirmButton;
104
103
  exports.PaymentKindRestrictionAlert = PaymentKindRestrictionAlert;
105
104
  exports.PaymentsDashboard = PaymentsDashboard;
@@ -110,8 +109,7 @@ exports.RecurringPaymentSettings = RecurringPaymentSettings;
110
109
  exports.RefundsDashboard = RefundsDashboard;
111
110
  exports.SplitTransfersDashboard = SplitTransfersDashboard;
112
111
  exports.TaxesDashboard = TaxesDashboard;
113
- exports.UpiConnect = UpiConnect;
114
- exports.UpiPayment = UpiPayment;
112
+ exports.ManualUpiPayment = ManualUpiPayment;
115
113
  exports.useRazorpayPayment = useRazorpayPayment;
116
114
  exports.useStripePromise = useStripePromise;
117
115
  exports.CURRENCY_OPTIONS = constants.CURRENCY_OPTIONS;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -22,8 +22,9 @@ var QUERY_KEYS = {
22
22
  SPLIT_TRANSFERS_DETAILS: "split-transfers-details",
23
23
  TAXES: "taxes",
24
24
  RECURRING_SETTINGS: "recurring-settings",
25
- RECURRING_PAYMENT: "recurring-payment"
25
+ RECURRING_PAYMENT: "recurring-payment",
26
+ VPAS_LIST: "vpas-list"
26
27
  };
27
28
 
28
29
  exports.QUERY_KEYS = QUERY_KEYS;
29
- //# sourceMappingURL=queryConstants-DGg4cX3r.js.map
30
+ //# sourceMappingURL=queryConstants-D2ARfy8-.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryConstants-D2ARfy8-.js","sources":["../../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n RECURRING_SETTINGS: \"recurring-settings\",\n RECURRING_PAYMENT: \"recurring-payment\",\n VPAS_LIST: \"vpas-list\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES","RECURRING_SETTINGS","RECURRING_PAYMENT","VPAS_LIST"],"mappings":";;AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,SAAS,EAAE;AACb;;;;"}
@@ -1,23 +1,28 @@
1
1
  'use strict';
2
2
 
3
+ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
3
4
  var _defineProperty = require('@babel/runtime/helpers/defineProperty');
4
5
  var reactQuery = require('@tanstack/react-query');
6
+ var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
5
7
  var axios = require('axios');
6
8
  var constants = require('./index-RKMq21yy.js');
7
9
 
8
10
  var create = function create(payload) {
9
- return axios.post("".concat(constants.BASE_URL, "/api/v1/public/upi/payments"), {
11
+ return axios.post("".concat(constants.BASE_URL, "/api/v1/public/manual_upi/payments"), {
10
12
  payment: payload
11
13
  });
12
14
  };
13
- var update = function update(id, payload) {
14
- return axios.put("".concat(constants.BASE_URL, "/api/v1/upi/payments/").concat(id), {
15
+ var update = function update(_ref) {
16
+ var id = _ref.id,
17
+ manualUpiId = _ref.manualUpiId,
18
+ payload = _ref.payload;
19
+ return axios.put("".concat(constants.BASE_URL, "/api/v1/manual_upi/").concat(manualUpiId, "/payments/").concat(id), {
15
20
  payment: payload
16
21
  });
17
22
  };
18
23
  var paymentsApi = {
19
- create: create,
20
- update: update
24
+ update: update,
25
+ create: create
21
26
  };
22
27
 
23
28
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
@@ -27,15 +32,24 @@ var useCreateUpiPayment = function useCreateUpiPayment(options) {
27
32
  mutationFn: paymentsApi.create
28
33
  }, options));
29
34
  };
30
- var useUpdateUpiPayment = function useUpdateUpiPayment(id) {
31
- var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
32
- return reactQuery.useMutation(_objectSpread({
33
- mutationFn: function mutationFn(payload) {
34
- return paymentsApi.update(id, payload);
35
- }
35
+ var useUpdateUpiPayment = function useUpdateUpiPayment(_ref) {
36
+ var id = _ref.id,
37
+ manualUpiId = _ref.manualUpiId,
38
+ _ref$options = _ref.options,
39
+ options = _ref$options === void 0 ? {} : _ref$options,
40
+ _ref$keysToInvalidate = _ref.keysToInvalidate,
41
+ keysToInvalidate = _ref$keysToInvalidate === void 0 ? [] : _ref$keysToInvalidate;
42
+ return reactUtils.useMutationWithInvalidation(function (payload) {
43
+ return paymentsApi.update({
44
+ id: id,
45
+ manualUpiId: manualUpiId,
46
+ payload: payload
47
+ });
48
+ }, _objectSpread({
49
+ keysToInvalidate: _toConsumableArray(keysToInvalidate)
36
50
  }, options));
37
51
  };
38
52
 
39
53
  exports.useCreateUpiPayment = useCreateUpiPayment;
40
54
  exports.useUpdateUpiPayment = useUpdateUpiPayment;
41
- //# sourceMappingURL=usePaymentsApi-BulmZ4H9.js.map
55
+ //# sourceMappingURL=usePaymentApi-CMOLq2VR.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePaymentApi-CMOLq2VR.js","sources":["../../app/javascript/src/apis/manual_upi/payments.js","../../app/javascript/src/hooks/reactQuery/manualUpi/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/manual_upi/payments`, {\n payment: payload,\n });\n\nconst update = ({ id, manualUpiId, payload }) =>\n axios.put(`${BASE_URL}/api/v1/manual_upi/${manualUpiId}/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { update, create };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport paymentsApi from \"apis/manual_upi/payments\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = ({\n id,\n manualUpiId,\n options = {},\n keysToInvalidate = [],\n}) =>\n useMutationWithInvalidation(\n payload => paymentsApi.update({ id, manualUpiId, payload }),\n { keysToInvalidate: [...keysToInvalidate], ...options }\n );\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","_ref","id","manualUpiId","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn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A,KAAA,CAAA,GAAG,EAAE,GAAAA,YAAA;IAAAC,qBAAA,GAAAZ,IAAA,CACZa,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;EAAA,OAErBE,sCAA2B,CACzB,UAAArB,OAAO,EAAA;IAAA,OAAIW,WAAW,CAACL,MAAM,CAAC;AAAEE,MAAAA,EAAE,EAAFA,EAAE;AAAEC,MAAAA,WAAW,EAAXA,WAAW;AAAET,MAAAA,OAAO,EAAPA;AAAQ,KAAC,CAAC;AAAA,GAAA,EAAAe,aAAA,CAAA;IACzDK,gBAAgB,EAAAE,kBAAA,CAAMF,gBAAgB;GAAMP,EAAAA,OAAO,CACvD,CAAC;AAAA;;;;;"}
@@ -7,7 +7,7 @@ require('@bigbinary/neeto-commons-frontend/react-utils');
7
7
  var axios = require('axios');
8
8
  var constants = require('./index-RKMq21yy.js');
9
9
  require('qs');
10
- var queryConstants = require('./queryConstants-DGg4cX3r.js');
10
+ var queryConstants = require('./queryConstants-D2ARfy8-.js');
11
11
 
12
12
  var list$1 = function list(payload) {
13
13
  return axios.get("".concat(constants.BASE_URL, "/api/v1/stripe/holdable/payouts"), {
@@ -81,4 +81,4 @@ exports.useFetchStripePayouts = useFetchStripePayouts;
81
81
  exports.useFetchStripePlatformPayouts = useFetchStripePlatformPayouts;
82
82
  exports.useShowStripePayout = useShowStripePayout;
83
83
  exports.useShowStripePlatformPayout = useShowStripePlatformPayout;
84
- //# sourceMappingURL=usePlatformApi-C1-u-hze.js.map
84
+ //# sourceMappingURL=usePlatformApi-CmetBzFR.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePlatformApi-C1-u-hze.js","sources":["../../app/javascript/src/apis/stripe/holdables/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../../app/javascript/src/apis/stripePlatform/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,kBAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,kBAAQ,EAAA,kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,YAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,MAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICuBpBG,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIT,O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kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,UAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,IAAI;AAAEO,EAAAA,IAAI,EAAJA;AAAK,CAAC;;;;ICkCpBgB,6BAA6B,GAAG,SAAhCA,6BAA6BA,CAAItB,OAAO,EAAA;AAAA,EAAA,IAAEU,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OACjEG,mBAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,yBAAU,CAACC,mBAAmB,EAAElB,OAAO,CAAC;IACnDmB,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQX,UAAU,CAACT,IAAI,CAACC,OAAO,CAAC;AAAA;GACpCU,EAAAA,OAAO,CACX,CAAC;AAAA;IAESa,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAAIhB,EAAE,EAAA;AAAA,EAAA,IAAEG,OAAO,GAAAC,SAAA,CAAAC,MAAA,GAAA,CAAA,IAAAD,SAAA,CAAA,CAAA,CAAA,KAAAE,SAAA,GAAAF,SAAA,CAAA,CAAA,CAAA,GAAG,EAAE;EAAA,OAC1DG,mBAAQ,CAAAC,aAAA,CAAA;AACNC,IAAAA,QAAQ,EAAE,CAACC,yBAAU,CAACI,aAAa,EAAEd,EAAE,CAAC;IACxCY,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQX,UAAU,CAACF,IAAI,CAACC,EAAE,CAAC;AAAA;GAC/BG,EAAAA,OAAO,CACX,CAAC;AAAA;;;;;;;"}
1
+ {"version":3,"file":"usePlatformApi-CmetBzFR.js","sources":["../../app/javascript/src/apis/stripe/holdables/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../../app/javascript/src/apis/stripePlatform/payouts.js","../../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,kBAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAAC,MAAA,CAAIC,kBAAQ,EAAA,kCAAA,CAAA,CAAAD,MAAA,CAAmCI,EAAE,CAAE,CAAC;AAAA,CAAA;AAE/D,IAAMC,YAAU,GAAG;AAAET,EAAAA,IAAI,EAAJA,MAAI;AAAEO,EAAAA,IA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board } from './AccountsDashboard.js';
2
2
  export { default as AdminCancelRecurringPaymentButton } from './AdminCancelRecurringPaymentButton.js';
3
3
  export { default as CashPaymentButton } from './CashPaymentButton.js';
4
4
  export { default as ConfirmCashPaymentButton } from './ConfirmCashPaymentButton.js';
5
- export { default as ConfirmUpiPaymentButton } from './ConfirmUpiPaymentButton.js';
6
5
  export { default as CustomerCancelRecurringPaymentForm } from './CustomerCancelRecurringPaymentForm.js';
6
+ export { default as ManualUpiConnect } from './ManualUpiConnect.js';
7
7
  export { default as ManualUpiPaymentConfirmButton } from './ManualUpiPaymentConfirmButton.js';
8
8
  export { default as PaymentKindRestrictionAlert } from './PaymentKindRestrictionAlert.js';
9
9
  export { default as PaymentsDashboard } from './PaymentsDashboard.js';
@@ -14,8 +14,7 @@ export { default as RecurringPaymentSettings } from './RecurringPaymentSettings.
14
14
  export { default as RefundsDashboard } from './RefundsDashboard.js';
15
15
  export { default as SplitTransfersDashboard } from './SplitTransfersDashboard.js';
16
16
  export { default as TaxesDashboard } from './TaxesDashboard.js';
17
- export { default as UpiConnect } from './UpiConnect.js';
18
- export { default as UpiPayment } from './UpiPayment.js';
17
+ export { default as ManualUpiPayment } from './ManualUpiPayment.js';
19
18
  export { default as useRazorpayPayment } from './useRazorpayPayment.js';
20
19
  export { default as useStripePromise } from './useStripePromise.js';
21
20
  export { C as CURRENCY_OPTIONS, b as buildStripeTransactionLink, g as getAmountInSmallestCurrencyUnit, h as getAmountWithAppliedTax, a as getFormattedAmount, c as getFormattedTaxAmount, e as getFormattedTipAmount, i as getQrCodeValue, f as getTaxAmount, d as getTipAmount } from './index-Cw8BnbrE.js';
@@ -57,34 +56,34 @@ import '@bigbinary/neeto-molecules/TableWrapper';
57
56
  import '@bigbinary/neetoui/Table';
58
57
  import '@bigbinary/neetoui/NoData';
59
58
  import '@bigbinary/neetoui/Spinner';
60
- import './queryConstants-mgjK5Hgk.js';
59
+ import './queryConstants-jobxv6K1.js';
61
60
  import '@bigbinary/neetoui/Alert';
62
61
  import './usePaymentApi-AuXKzJ-d.js';
63
62
  import '@bigbinary/neetoui/formik/Form';
64
63
  import '@bigbinary/neetoui/formik/Textarea';
65
64
  import '@bigbinary/neetoui/formik/ActionBlock';
66
- import '@bigbinary/neetoui/formik/Select';
67
- import './usePaymentsApi-BWiIWIWh.js';
68
- import 'yup';
69
65
  import '@bigbinary/neetoui/formik/Button';
66
+ import '@bigbinary/neeto-molecules/CardLayout';
67
+ import '@bigbinary/neetoui/formik/Input';
68
+ import 'yup';
69
+ import '@bigbinary/neeto-molecules/MoreDropdown';
70
+ import '@bigbinary/neetoui/formik/Select';
71
+ import './usePaymentApi-CditWIud.js';
70
72
  import '@babel/runtime/helpers/objectWithoutProperties';
71
73
  import './ExportModal-CWKMcZgh.js';
72
- import './usePlatformApi-Ca-CVxhW.js';
74
+ import './usePlatformApi-CvRR6Wi5.js';
73
75
  import 'qs';
74
76
  import 'react-router-dom/cjs/react-router-dom';
75
77
  import '@babel/runtime/helpers/asyncToGenerator';
76
78
  import '@babel/runtime/regenerator';
77
79
  import './usePaymentApi-DSL5iVNT.js';
78
- import '@bigbinary/neeto-molecules/CardLayout';
79
80
  import '@bigbinary/neeto-molecules/Container';
80
- import '@bigbinary/neetoui/formik/Input';
81
81
  import '@bigbinary/neeto-molecules/HelpPopover';
82
82
  import '@bigbinary/neetoui/Pane';
83
83
  import '@bigbinary/neetoui/Dropdown';
84
84
  import '@bigbinary/neeto-molecules/PageLoader';
85
85
  import '@bigbinary/neetoui/Label';
86
86
  import '@bigbinary/neetoui/formik/Radio';
87
- import '@bigbinary/neeto-molecules/MoreDropdown';
88
87
  import 'qrcode.react';
89
88
  import '@bigbinary/neeto-commons-frontend/initializers';
90
89
  import 'decimal.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -20,8 +20,9 @@ var QUERY_KEYS = {
20
20
  SPLIT_TRANSFERS_DETAILS: "split-transfers-details",
21
21
  TAXES: "taxes",
22
22
  RECURRING_SETTINGS: "recurring-settings",
23
- RECURRING_PAYMENT: "recurring-payment"
23
+ RECURRING_PAYMENT: "recurring-payment",
24
+ VPAS_LIST: "vpas-list"
24
25
  };
25
26
 
26
27
  export { QUERY_KEYS as Q };
27
- //# sourceMappingURL=queryConstants-mgjK5Hgk.js.map
28
+ //# sourceMappingURL=queryConstants-jobxv6K1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"queryConstants-jobxv6K1.js","sources":["../app/javascript/src/common/queryConstants.js"],"sourcesContent":["export const QUERY_KEYS = {\n STRIPE_ACCOUNT_DETAILS: \"stripe-account-details\",\n STRIPE_PLATFORM_ACCOUNT_DETAILS: \"stripe-platform-account-details\",\n TRANSACTIONS_LIST: \"transactions-list\",\n PLATFORM_TRANSACTIONS_LIST: \"platform-transactions-list\",\n PAYMENTS_FILTER_OPTIONS: \"payments-filter-options\",\n REFUNDS_LIST: \"refunds-list\",\n SPLITS_LIST: \"platform-splits-list\",\n CONNECTED_ACCOUNT: \"connected-account\",\n STRIPE_ACCOUNTS_LIST: \"stripe-accounts-list\",\n STRIPE_PLATFORM_TRANSACTION: \"stripe-platform-transaction\",\n STRIPE_REFUNDS_LIST: \"stripe-refunds-list\",\n STRIPE_PAYOUTS_LIST: \"stripe-payouts-list\",\n STRIPE_PAYOUT: \"stripe-payout\",\n RAZORPAY_PAYMENTS_LIST: \"razorpay-payment-list\",\n RAZORPAY_ACCOUNT_DETAILS: \"razorpay-account-details\",\n V2_PAYMENTS: \"v2-payments\",\n PAYMENTS_LIST: \"payments-list\",\n SPLIT_TRANSFERS_LIST: \"split-transfers-list\",\n SPLIT_TRANSFERS_DETAILS: \"split-transfers-details\",\n TAXES: \"taxes\",\n RECURRING_SETTINGS: \"recurring-settings\",\n RECURRING_PAYMENT: \"recurring-payment\",\n VPAS_LIST: \"vpas-list\",\n};\n"],"names":["QUERY_KEYS","STRIPE_ACCOUNT_DETAILS","STRIPE_PLATFORM_ACCOUNT_DETAILS","TRANSACTIONS_LIST","PLATFORM_TRANSACTIONS_LIST","PAYMENTS_FILTER_OPTIONS","REFUNDS_LIST","SPLITS_LIST","CONNECTED_ACCOUNT","STRIPE_ACCOUNTS_LIST","STRIPE_PLATFORM_TRANSACTION","STRIPE_REFUNDS_LIST","STRIPE_PAYOUTS_LIST","STRIPE_PAYOUT","RAZORPAY_PAYMENTS_LIST","RAZORPAY_ACCOUNT_DETAILS","V2_PAYMENTS","PAYMENTS_LIST","SPLIT_TRANSFERS_LIST","SPLIT_TRANSFERS_DETAILS","TAXES","RECURRING_SETTINGS","RECURRING_PAYMENT","VPAS_LIST"],"mappings":"AAAO,IAAMA,UAAU,GAAG;AACxBC,EAAAA,sBAAsB,EAAE,wBAAwB;AAChDC,EAAAA,+BAA+B,EAAE,iCAAiC;AAClEC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,0BAA0B,EAAE,4BAA4B;AACxDC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,YAAY,EAAE,cAAc;AAC5BC,EAAAA,WAAW,EAAE,sBAAsB;AACnCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,2BAA2B,EAAE,6BAA6B;AAC1DC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,mBAAmB,EAAE,qBAAqB;AAC1CC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,sBAAsB,EAAE,uBAAuB;AAC/CC,EAAAA,wBAAwB,EAAE,0BAA0B;AACpDC,EAAAA,WAAW,EAAE,aAAa;AAC1BC,EAAAA,aAAa,EAAE,eAAe;AAC9BC,EAAAA,oBAAoB,EAAE,sBAAsB;AAC5CC,EAAAA,uBAAuB,EAAE,yBAAyB;AAClDC,EAAAA,KAAK,EAAE,OAAO;AACdC,EAAAA,kBAAkB,EAAE,oBAAoB;AACxCC,EAAAA,iBAAiB,EAAE,mBAAmB;AACtCC,EAAAA,SAAS,EAAE;AACb;;;;"}
@@ -0,0 +1,52 @@
1
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
+ import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
+ import { useMutation } from '@tanstack/react-query';
4
+ import { useMutationWithInvalidation } from '@bigbinary/neeto-commons-frontend/react-utils';
5
+ import axios from 'axios';
6
+ import { B as BASE_URL } from './index-Cw8BnbrE.js';
7
+
8
+ var create = function create(payload) {
9
+ return axios.post("".concat(BASE_URL, "/api/v1/public/manual_upi/payments"), {
10
+ payment: payload
11
+ });
12
+ };
13
+ var update = function update(_ref) {
14
+ var id = _ref.id,
15
+ manualUpiId = _ref.manualUpiId,
16
+ payload = _ref.payload;
17
+ return axios.put("".concat(BASE_URL, "/api/v1/manual_upi/").concat(manualUpiId, "/payments/").concat(id), {
18
+ payment: payload
19
+ });
20
+ };
21
+ var paymentsApi = {
22
+ update: update,
23
+ create: create
24
+ };
25
+
26
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
27
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
28
+ var useCreateUpiPayment = function useCreateUpiPayment(options) {
29
+ return useMutation(_objectSpread({
30
+ mutationFn: paymentsApi.create
31
+ }, options));
32
+ };
33
+ var useUpdateUpiPayment = function useUpdateUpiPayment(_ref) {
34
+ var id = _ref.id,
35
+ manualUpiId = _ref.manualUpiId,
36
+ _ref$options = _ref.options,
37
+ options = _ref$options === void 0 ? {} : _ref$options,
38
+ _ref$keysToInvalidate = _ref.keysToInvalidate,
39
+ keysToInvalidate = _ref$keysToInvalidate === void 0 ? [] : _ref$keysToInvalidate;
40
+ return useMutationWithInvalidation(function (payload) {
41
+ return paymentsApi.update({
42
+ id: id,
43
+ manualUpiId: manualUpiId,
44
+ payload: payload
45
+ });
46
+ }, _objectSpread({
47
+ keysToInvalidate: _toConsumableArray(keysToInvalidate)
48
+ }, options));
49
+ };
50
+
51
+ export { useUpdateUpiPayment as a, useCreateUpiPayment as u };
52
+ //# sourceMappingURL=usePaymentApi-CditWIud.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePaymentApi-CditWIud.js","sources":["../app/javascript/src/apis/manual_upi/payments.js","../app/javascript/src/hooks/reactQuery/manualUpi/usePaymentApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst create = payload =>\n axios.post(`${BASE_URL}/api/v1/public/manual_upi/payments`, {\n payment: payload,\n });\n\nconst update = ({ id, manualUpiId, payload }) =>\n axios.put(`${BASE_URL}/api/v1/manual_upi/${manualUpiId}/payments/${id}`, {\n payment: payload,\n });\n\nconst paymentsApi = { update, create };\n\nexport default paymentsApi;\n","import { useMutation } from \"@tanstack/react-query\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport paymentsApi from \"apis/manual_upi/payments\";\n\nexport const useCreateUpiPayment = options =>\n useMutation({ mutationFn: paymentsApi.create, ...options });\n\nexport const useUpdateUpiPayment = ({\n id,\n manualUpiId,\n options = {},\n keysToInvalidate = [],\n}) =>\n useMutationWithInvalidation(\n payload => paymentsApi.update({ id, manualUpiId, payload }),\n { keysToInvalidate: [...keysToInvalidate], ...options }\n );\n"],"names":["create","payload","axios","post","concat","BASE_URL","payment","update","_ref","id","manualUpiId","put","paymentsApi","useCreateUpiPayment","options","useMutation","_objectSpread","mutationFn","useUpdateUpiPayment","_ref$options","_ref$keysToInvalidate","keysToInvalidate","useMutationWithInvalidation","_toConsumableArray"],"mappings":";;;;;;;AAIA,IAAMA,MAAM,GAAG,SAATA,MAAMA,CAAGC,OAAO,EAAA;AAAA,EAAA,OACpBC,KAAK,CAACC,IAAI,IAAAC,MAAA,CAAIC,QAAQ,EAAsC,oCAAA,CAAA,EAAA;AAC1DC,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMM,MAAM,GAAG,SAATA,MAAMA,CAAAC,IAAA,EAAA;AAAA,EAAA,IAAMC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IAAEC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAET,OAAO,GAAAO,IAAA,CAAPP,OAAO;AAAA,EAAA,OACxCC,KAAK,CAACS,GAAG,CAAA,EAAA,CAAAP,MAAA,CAAIC,QAAQ,EAAAD,qBAAAA,CAAAA,CAAAA,MAAA,CAAsBM,WAAW,EAAA,YAAA,CAAA,CAAAN,MAAA,CAAaK,EAAE,CAAI,EAAA;AACvEH,IAAAA,OAAO,EAAEL;AACX,GAAC,CAAC;AAAA,CAAA;AAEJ,IAAMW,WAAW,GAAG;AAAEL,EAAAA,MAAM,EAANA,MAAM;AAAEP,EAAAA,MAAM,EAANA;AAAO,CAAC;;;;ICTzBa,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAGC,OAAO,EAAA;EAAA,OACxCC,WAAW,CAAAC,aAAA,CAAA;IAAGC,UAAU,EAAEL,WAAW,CAACZ;GAAWc,EAAAA,OAAO,CAAE,CAAC;AAAA;IAEhDI,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAAV,IAAA,EAAA;AAAA,EAAA,IAC9BC,EAAE,GAAAD,IAAA,CAAFC,EAAE;IACFC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IAAAS,YAAA,GAAAX,IAAA,CACXM,OAAO;AAAPA,IAAAA,OAAO,GAAAK,YAAA,KAAA,KAAA,CAAA,GAAG,EAAE,GAAAA,YAAA;IAAAC,qBAAA,GAAAZ,IAAA,CACZa,gBAAgB;AAAhBA,IAAAA,gBAAgB,GAAAD,qBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,qBAAA;EAAA,OAErBE,2BAA2B,CACzB,UAAArB,OAAO,EAAA;IAAA,OAAIW,WAAW,CAACL,MAAM,CAAC;AAAEE,MAAAA,EAAE,EAAFA,EAAE;AAAEC,MAAAA,WAAW,EAAXA,WAAW;AAAET,MAAAA,OAAO,EAAPA;AAAQ,KAAC,CAAC;AAAA,GAAA,EAAAe,aAAA,CAAA;IACzDK,gBAAgB,EAAAE,kBAAA,CAAMF,gBAAgB;GAAMP,EAAAA,OAAO,CACvD,CAAC;AAAA;;;;"}
@@ -5,7 +5,7 @@ import '@bigbinary/neeto-commons-frontend/react-utils';
5
5
  import axios from 'axios';
6
6
  import { B as BASE_URL } from './index-Cw8BnbrE.js';
7
7
  import 'qs';
8
- import { Q as QUERY_KEYS } from './queryConstants-mgjK5Hgk.js';
8
+ import { Q as QUERY_KEYS } from './queryConstants-jobxv6K1.js';
9
9
 
10
10
  var list$1 = function list(payload) {
11
11
  return axios.get("".concat(BASE_URL, "/api/v1/stripe/holdable/payouts"), {
@@ -76,4 +76,4 @@ var useShowStripePlatformPayout = function useShowStripePlatformPayout(id) {
76
76
  };
77
77
 
78
78
  export { useFetchStripePlatformPayouts as a, useShowStripePayout as b, useShowStripePlatformPayout as c, useFetchStripePayouts as u };
79
- //# sourceMappingURL=usePlatformApi-Ca-CVxhW.js.map
79
+ //# sourceMappingURL=usePlatformApi-CvRR6Wi5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"usePlatformApi-Ca-CVxhW.js","sources":["../app/javascript/src/apis/stripe/holdables/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../app/javascript/src/apis/stripePlatform/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,QAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA;AAAA,EAAA,OACbN,KAAK,CAACC,GAAG,CAAA,EAAA,CAAA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AAA,MAAA,OAAQX,UAAU,CAACF,IAAI,CAACC,EAAE,CAAC;AAAA;GAC/BG,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
1
+ {"version":3,"file":"usePlatformApi-CvRR6Wi5.js","sources":["../app/javascript/src/apis/stripe/holdables/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/useConnectApi.js","../app/javascript/src/apis/stripePlatform/payouts.js","../app/javascript/src/hooks/reactQuery/stripe/usePlatformApi.js"],"sourcesContent":["import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe/holdable/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\nimport { isPresent } from \"neetocist\";\nimport { useMutationWithInvalidation } from \"neetocommons/react-utils\";\n\nimport accountsApi from \"apis/stripe/holdables/accounts\";\nimport payoutsApi from \"apis/stripe/holdables/payouts\";\nimport transactionsApi from \"apis/stripe/holdables/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchConnectedStripeAccount = (holdableId, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n queryFn: () => accountsApi.show(holdableId),\n ...options,\n });\n\nexport const useFetchStripeTransactions = (\n holdableId = \"\",\n payload = {},\n options = {}\n) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => {\n if (isPresent(holdableId)) {\n return transactionsApi.list(holdableId, payload);\n }\n\n return transactionsApi.defaultList(payload);\n },\n ...options,\n });\n\nexport const useFetchStripePayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n\nexport const usePollingStripeAccount = (holdableId, { refetchInterval }) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n queryFn: () => accountsApi.show(holdableId),\n refetchInterval,\n });\n\nexport const usePollingStripeAccountCreationStatus = (jobId, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS, jobId],\n queryFn: () => accountsApi.creationStatus(jobId),\n ...options,\n });\n\nexport const useDestroyStripeAccount = ({ onSuccess, holdableId }) =>\n useMutationWithInvalidation(accountsApi.destroy, {\n keysToInvalidate: [\n [QUERY_KEYS.STRIPE_ACCOUNT_DETAILS],\n [QUERY_KEYS.CONNECTED_ACCOUNT, holdableId],\n ],\n onSuccess,\n });\n\nexport const useCreateStripeAccount = ({ onSuccess }) =>\n useMutationWithInvalidation(accountsApi.create, {\n keysToInvalidate: [[QUERY_KEYS.STRIPE_ACCOUNT_DETAILS]],\n onSuccess,\n });\n","import axios from \"axios\";\n\nimport { BASE_URL } from \"src/constants\";\n\nconst list = payload =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts`, { params: payload });\n\nconst show = id =>\n axios.get(`${BASE_URL}/api/v1/stripe_platform/payouts/${id}`);\n\nconst payoutsApi = { list, show };\n\nexport default payoutsApi;\n","import { useQuery } from \"@tanstack/react-query\";\n\nimport refundsApi from \"apis/stripe/holdables/refunds\";\nimport accountsApi from \"apis/stripePlatform/accounts\";\nimport payoutsApi from \"apis/stripePlatform/payouts\";\nimport splitsApi from \"apis/stripePlatform/splits\";\nimport transactionsApi from \"apis/stripePlatform/transactions\";\nimport { QUERY_KEYS } from \"src/common/queryConstants\";\n\nexport const useFetchStripePlatformAccount = options =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_ACCOUNT_DETAILS],\n queryFn: accountsApi.show,\n ...options,\n });\n\nexport const useFetchStripePlatformSplits = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.SPLITS_LIST, payload],\n queryFn: () => splitsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransactions = (payload, options) =>\n useQuery({\n queryKey: [QUERY_KEYS.TRANSACTIONS_LIST, payload],\n queryFn: () => transactionsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformTransaction = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PLATFORM_TRANSACTION, id],\n queryFn: () => transactionsApi.show(id),\n ...options,\n });\n\nexport const useFetchStripeRefunds = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_REFUNDS_LIST, payload],\n queryFn: () => refundsApi.list(payload),\n ...options,\n });\n\nexport const useFetchStripePlatformPayouts = (payload, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUTS_LIST, payload],\n queryFn: () => payoutsApi.list(payload),\n ...options,\n });\n\nexport const useShowStripePlatformPayout = (id, options = {}) =>\n useQuery({\n queryKey: [QUERY_KEYS.STRIPE_PAYOUT, id],\n queryFn: () => payoutsApi.show(id),\n ...options,\n });\n"],"names":["list","payload","axios","get","concat","BASE_URL","params","show","id","payoutsApi","useFetchStripePayouts","options","arguments","length","undefined","useQuery","_objectSpread","queryKey","QUERY_KEYS","STRIPE_PAYOUTS_LIST","queryFn","useShowStripePayout","STRIPE_PAYOUT","useFetchStripePlatformPayouts","useShowStripePlatformPayout"],"mappings":";;;;;;;;;AAIA,IAAMA,MAAI,GAAG,SAAPA,IAAIA,CAAGC,OAAO,EAAA;AAAA,EAAA,OAClBC,KAAK,CAACC,GAAG,IAAAC,MAAA,CAAIC,QAAQ,EAAmC,iCAAA,CAAA,EAAA;AAAEC,IAAAA,MAAM,EAAEL;AAAQ,GAAC,CAAC;AAAA,CAAA;AAE9E,IAAMM,MAAI,GAAG,SAAPA,IAAIA,CAAGC,EAAE,EAAA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d,EAAE,CAAC;IACxCY,OAAO,EAAE,SAATA,OAAOA,GAAA;AAAA,MAAA,OAAQX,UAAU,CAACF,IAAI,CAACC,EAAE,CAAC;AAAA;GAC/BG,EAAAA,OAAO,CACX,CAAC;AAAA;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bigbinary/neeto-payments-frontend",
3
- "version": "3.3.48",
3
+ "version": "4.0.0",
4
4
  "description": "To manage payments across the neeto products.",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://github.com/bigbinary/neeto-payments-nano",
@@ -64,8 +64,8 @@
64
64
  "@bigbinary/neeto-editor": "1.47.20",
65
65
  "@bigbinary/neeto-filters-frontend": "4.3.22",
66
66
  "@bigbinary/neeto-icons": "1.20.53",
67
- "@bigbinary/neeto-molecules": "3.16.77",
68
- "@bigbinary/neetoui": "8.3.12",
67
+ "@bigbinary/neeto-molecules": "3.16.81",
68
+ "@bigbinary/neetoui": "8.3.13",
69
69
  "@emotion/is-prop-valid": "1.2.0",
70
70
  "@faker-js/faker": "8.2.0",
71
71
  "@honeybadger-io/js": "6.10.1",
@@ -175,8 +175,8 @@
175
175
  "@bigbinary/neeto-editor": "1.47.20",
176
176
  "@bigbinary/neeto-filters-frontend": "4.3.22",
177
177
  "@bigbinary/neeto-icons": "1.20.53",
178
- "@bigbinary/neeto-molecules": "3.16.77",
179
- "@bigbinary/neetoui": "8.3.12",
178
+ "@bigbinary/neeto-molecules": "3.16.81",
179
+ "@bigbinary/neetoui": "8.3.13",
180
180
  "@honeybadger-io/js": "6.10.1",
181
181
  "@honeybadger-io/react": "6.1.25",
182
182
  "@tailwindcss/container-queries": "^0.1.1",