@connectedxm/admin 6.5.5 → 6.5.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.cjs CHANGED
@@ -1052,6 +1052,7 @@ __export(index_exports, {
1052
1052
  GetInvoice: () => GetInvoice,
1053
1053
  GetInvoiceLineItem: () => GetInvoiceLineItem,
1054
1054
  GetInvoiceLineItems: () => GetInvoiceLineItems,
1055
+ GetInvoicePayments: () => GetInvoicePayments,
1055
1056
  GetInvoices: () => GetInvoices,
1056
1057
  GetLevel: () => GetLevel,
1057
1058
  GetLevelAccounts: () => GetLevelAccounts,
@@ -1225,6 +1226,7 @@ __export(index_exports, {
1225
1226
  INVOICES_QUERY_KEY: () => INVOICES_QUERY_KEY,
1226
1227
  INVOICE_LINE_ITEMS_QUERY_KEY: () => INVOICE_LINE_ITEMS_QUERY_KEY,
1227
1228
  INVOICE_LINE_ITEM_QUERY_KEY: () => INVOICE_LINE_ITEM_QUERY_KEY,
1229
+ INVOICE_PAYMENTS_QUERY_KEY: () => INVOICE_PAYMENTS_QUERY_KEY,
1228
1230
  INVOICE_QUERY_KEY: () => INVOICE_QUERY_KEY,
1229
1231
  ImageType: () => ImageType,
1230
1232
  ImpersonateAccount: () => ImpersonateAccount,
@@ -1748,6 +1750,7 @@ __export(index_exports, {
1748
1750
  SET_INVOICES_QUERY_DATA: () => SET_INVOICES_QUERY_DATA,
1749
1751
  SET_INVOICE_LINE_ITEMS_QUERY_DATA: () => SET_INVOICE_LINE_ITEMS_QUERY_DATA,
1750
1752
  SET_INVOICE_LINE_ITEM_QUERY_DATA: () => SET_INVOICE_LINE_ITEM_QUERY_DATA,
1753
+ SET_INVOICE_PAYMENTS_QUERY_DATA: () => SET_INVOICE_PAYMENTS_QUERY_DATA,
1751
1754
  SET_INVOICE_QUERY_DATA: () => SET_INVOICE_QUERY_DATA,
1752
1755
  SET_LEVELS_QUERY_DATA: () => SET_LEVELS_QUERY_DATA,
1753
1756
  SET_LEVEL_ACCOUNTS_QUERY_DATA: () => SET_LEVEL_ACCOUNTS_QUERY_DATA,
@@ -2836,6 +2839,7 @@ __export(index_exports, {
2836
2839
  useGetInvoice: () => useGetInvoice,
2837
2840
  useGetInvoiceLineItem: () => useGetInvoiceLineItem,
2838
2841
  useGetInvoiceLineItems: () => useGetInvoiceLineItems,
2842
+ useGetInvoicePayments: () => useGetInvoicePayments,
2839
2843
  useGetInvoices: () => useGetInvoices,
2840
2844
  useGetLevel: () => useGetLevel,
2841
2845
  useGetLevelAccounts: () => useGetLevelAccounts,
@@ -17711,6 +17715,45 @@ var useGetInvoiceLineItem = (invoiceId = "", lineItemId = "", options = {}) => {
17711
17715
  );
17712
17716
  };
17713
17717
 
17718
+ // src/queries/invoices/useGetInvoicePayments.ts
17719
+ var INVOICE_PAYMENTS_QUERY_KEY = (invoiceId) => [
17720
+ ...INVOICE_QUERY_KEY(invoiceId),
17721
+ "PAYMENTS"
17722
+ ];
17723
+ var SET_INVOICE_PAYMENTS_QUERY_DATA = (client, keyParams, response) => {
17724
+ client.setQueryData(INVOICE_PAYMENTS_QUERY_KEY(...keyParams), response);
17725
+ };
17726
+ var GetInvoicePayments = async ({
17727
+ pageParam,
17728
+ pageSize,
17729
+ orderBy,
17730
+ search,
17731
+ adminApiParams,
17732
+ invoiceId
17733
+ }) => {
17734
+ const adminApi = await GetAdminAPI(adminApiParams);
17735
+ const { data } = await adminApi.get(`/invoices/${invoiceId}/payments`, {
17736
+ params: {
17737
+ page: pageParam || void 0,
17738
+ pageSize: pageSize || void 0,
17739
+ orderBy: orderBy || void 0,
17740
+ search: search || void 0
17741
+ }
17742
+ });
17743
+ return data;
17744
+ };
17745
+ var useGetInvoicePayments = (invoiceId, params = {}, options = {}) => {
17746
+ return useConnectedInfiniteQuery(
17747
+ INVOICE_PAYMENTS_QUERY_KEY(invoiceId),
17748
+ (params2) => GetInvoicePayments({ ...params2, invoiceId }),
17749
+ params,
17750
+ {
17751
+ ...options,
17752
+ enabled: !!invoiceId && (options.enabled ?? true)
17753
+ }
17754
+ );
17755
+ };
17756
+
17714
17757
  // src/queries/levels/useGetLevels.ts
17715
17758
  var LEVELS_QUERY_KEY = () => ["LEVELS"];
17716
17759
  var SET_LEVELS_QUERY_DATA = (client, keyParams, response) => {
@@ -40050,6 +40093,7 @@ var useUploadVideoCaptions = (options = {}) => {
40050
40093
  GetInvoice,
40051
40094
  GetInvoiceLineItem,
40052
40095
  GetInvoiceLineItems,
40096
+ GetInvoicePayments,
40053
40097
  GetInvoices,
40054
40098
  GetLevel,
40055
40099
  GetLevelAccounts,
@@ -40223,6 +40267,7 @@ var useUploadVideoCaptions = (options = {}) => {
40223
40267
  INVOICES_QUERY_KEY,
40224
40268
  INVOICE_LINE_ITEMS_QUERY_KEY,
40225
40269
  INVOICE_LINE_ITEM_QUERY_KEY,
40270
+ INVOICE_PAYMENTS_QUERY_KEY,
40226
40271
  INVOICE_QUERY_KEY,
40227
40272
  ImageType,
40228
40273
  ImpersonateAccount,
@@ -40746,6 +40791,7 @@ var useUploadVideoCaptions = (options = {}) => {
40746
40791
  SET_INVOICES_QUERY_DATA,
40747
40792
  SET_INVOICE_LINE_ITEMS_QUERY_DATA,
40748
40793
  SET_INVOICE_LINE_ITEM_QUERY_DATA,
40794
+ SET_INVOICE_PAYMENTS_QUERY_DATA,
40749
40795
  SET_INVOICE_QUERY_DATA,
40750
40796
  SET_LEVELS_QUERY_DATA,
40751
40797
  SET_LEVEL_ACCOUNTS_QUERY_DATA,
@@ -41834,6 +41880,7 @@ var useUploadVideoCaptions = (options = {}) => {
41834
41880
  useGetInvoice,
41835
41881
  useGetInvoiceLineItem,
41836
41882
  useGetInvoiceLineItems,
41883
+ useGetInvoicePayments,
41837
41884
  useGetInvoices,
41838
41885
  useGetLevel,
41839
41886
  useGetLevelAccounts,