@connectedxm/admin 2.10.1 → 2.10.3

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
@@ -13842,7 +13842,7 @@ var GetEventSessionAccesses = async ({
13842
13842
  pageSize: pageSize || void 0,
13843
13843
  orderBy: orderBy || void 0,
13844
13844
  search: search || void 0,
13845
- purchaseStatus: purchaseStatus || void 0
13845
+ status: purchaseStatus || void 0
13846
13846
  }
13847
13847
  }
13848
13848
  );
@@ -16926,7 +16926,13 @@ var useGetInterestGroups = (interestId = "", params = {}, options = {}) => {
16926
16926
  };
16927
16927
 
16928
16928
  // src/queries/invoices/useGetInvoices.ts
16929
- var INVOICES_QUERY_KEY = () => ["INVOICES"];
16929
+ var INVOICES_QUERY_KEY = (status, accountId, eventId) => {
16930
+ const key = ["INVOICES"];
16931
+ if (status) key.push(status);
16932
+ if (accountId) key.push(accountId);
16933
+ if (eventId) key.push(eventId);
16934
+ return key;
16935
+ };
16930
16936
  var SET_INVOICES_QUERY_DATA = (client, keyParams, response) => {
16931
16937
  client.setQueryData(INVOICES_QUERY_KEY(...keyParams), response);
16932
16938
  };
@@ -16935,7 +16941,10 @@ var GetInvoices = async ({
16935
16941
  pageSize,
16936
16942
  orderBy,
16937
16943
  search,
16938
- adminApiParams
16944
+ adminApiParams,
16945
+ accountId,
16946
+ eventId,
16947
+ status
16939
16948
  }) => {
16940
16949
  const adminApi = await GetAdminAPI(adminApiParams);
16941
16950
  const { data } = await adminApi.get(`/invoices`, {
@@ -16943,15 +16952,18 @@ var GetInvoices = async ({
16943
16952
  page: pageParam || void 0,
16944
16953
  pageSize: pageSize || void 0,
16945
16954
  orderBy: orderBy || void 0,
16946
- search: search || void 0
16955
+ search: search || void 0,
16956
+ status: status || void 0,
16957
+ accountId: accountId || void 0,
16958
+ eventId: eventId || void 0
16947
16959
  }
16948
16960
  });
16949
16961
  return data;
16950
16962
  };
16951
- var useGetInvoices = (params = {}, options = {}) => {
16963
+ var useGetInvoices = (status, accountId, eventId, params = {}, options = {}) => {
16952
16964
  return useConnectedInfiniteQuery(
16953
- INVOICES_QUERY_KEY(),
16954
- (params2) => GetInvoices(params2),
16965
+ INVOICES_QUERY_KEY(status, accountId, eventId),
16966
+ (params2) => GetInvoices({ ...params2, accountId, eventId, status }),
16955
16967
  params,
16956
16968
  options,
16957
16969
  "invoices"
package/dist/index.d.cts CHANGED
@@ -1267,6 +1267,8 @@ interface Invoice extends BaseInvoice {
1267
1267
  payments: BasePayment;
1268
1268
  accountId: string | null;
1269
1269
  account: BaseAccount | null;
1270
+ eventId: string | null;
1271
+ event: BaseEvent | null;
1270
1272
  createdAt: string;
1271
1273
  updatedAt: string;
1272
1274
  }
@@ -4523,6 +4525,7 @@ interface InvoiceCreateInputs {
4523
4525
  status?: keyof typeof InvoiceStatus | null;
4524
4526
  notes?: string | null;
4525
4527
  accountId?: string | null;
4528
+ eventId?: string | null;
4526
4529
  }
4527
4530
  interface InvoiceLineItemCreateInputs {
4528
4531
  name: string;
@@ -4543,6 +4546,7 @@ interface InvoiceUpdateInputs {
4543
4546
  dueDate?: string | null;
4544
4547
  notes?: string | null;
4545
4548
  accountId?: string | null;
4549
+ eventId?: string | null;
4546
4550
  }
4547
4551
  interface LeadCreateInputs {
4548
4552
  status?: LeadStatus;
@@ -13644,24 +13648,27 @@ declare const useGetInvoicePayments: (invoiceId?: string, params?: Omit<Infinite
13644
13648
  * @category Keys
13645
13649
  * @group Invoices
13646
13650
  */
13647
- declare const INVOICES_QUERY_KEY: () => string[];
13651
+ declare const INVOICES_QUERY_KEY: (status?: keyof typeof InvoiceStatus, accountId?: string, eventId?: string) => string[];
13648
13652
  /**
13649
13653
  * @category Setters
13650
13654
  * @group Invoices
13651
13655
  */
13652
13656
  declare const SET_INVOICES_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof INVOICES_QUERY_KEY>, response: Awaited<ReturnType<typeof GetInvoices>>) => void;
13653
13657
  interface GetInvoicesProps extends InfiniteQueryParams {
13658
+ accountId?: string;
13659
+ eventId?: string;
13660
+ status?: keyof typeof InvoiceStatus;
13654
13661
  }
13655
13662
  /**
13656
13663
  * @category Queries
13657
13664
  * @group Invoices
13658
13665
  */
13659
- declare const GetInvoices: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetInvoicesProps) => Promise<ConnectedXMResponse<Invoice[]>>;
13666
+ declare const GetInvoices: ({ pageParam, pageSize, orderBy, search, adminApiParams, accountId, eventId, status, }: GetInvoicesProps) => Promise<ConnectedXMResponse<Invoice[]>>;
13660
13667
  /**
13661
13668
  * @category Hooks
13662
13669
  * @group Invoices
13663
13670
  */
13664
- declare const useGetInvoices: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetInvoices>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Invoice[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
13671
+ declare const useGetInvoices: (status?: keyof typeof InvoiceStatus, accountId?: string, eventId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetInvoices>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Invoice[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
13665
13672
 
13666
13673
  /**
13667
13674
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -1267,6 +1267,8 @@ interface Invoice extends BaseInvoice {
1267
1267
  payments: BasePayment;
1268
1268
  accountId: string | null;
1269
1269
  account: BaseAccount | null;
1270
+ eventId: string | null;
1271
+ event: BaseEvent | null;
1270
1272
  createdAt: string;
1271
1273
  updatedAt: string;
1272
1274
  }
@@ -4523,6 +4525,7 @@ interface InvoiceCreateInputs {
4523
4525
  status?: keyof typeof InvoiceStatus | null;
4524
4526
  notes?: string | null;
4525
4527
  accountId?: string | null;
4528
+ eventId?: string | null;
4526
4529
  }
4527
4530
  interface InvoiceLineItemCreateInputs {
4528
4531
  name: string;
@@ -4543,6 +4546,7 @@ interface InvoiceUpdateInputs {
4543
4546
  dueDate?: string | null;
4544
4547
  notes?: string | null;
4545
4548
  accountId?: string | null;
4549
+ eventId?: string | null;
4546
4550
  }
4547
4551
  interface LeadCreateInputs {
4548
4552
  status?: LeadStatus;
@@ -13644,24 +13648,27 @@ declare const useGetInvoicePayments: (invoiceId?: string, params?: Omit<Infinite
13644
13648
  * @category Keys
13645
13649
  * @group Invoices
13646
13650
  */
13647
- declare const INVOICES_QUERY_KEY: () => string[];
13651
+ declare const INVOICES_QUERY_KEY: (status?: keyof typeof InvoiceStatus, accountId?: string, eventId?: string) => string[];
13648
13652
  /**
13649
13653
  * @category Setters
13650
13654
  * @group Invoices
13651
13655
  */
13652
13656
  declare const SET_INVOICES_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof INVOICES_QUERY_KEY>, response: Awaited<ReturnType<typeof GetInvoices>>) => void;
13653
13657
  interface GetInvoicesProps extends InfiniteQueryParams {
13658
+ accountId?: string;
13659
+ eventId?: string;
13660
+ status?: keyof typeof InvoiceStatus;
13654
13661
  }
13655
13662
  /**
13656
13663
  * @category Queries
13657
13664
  * @group Invoices
13658
13665
  */
13659
- declare const GetInvoices: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetInvoicesProps) => Promise<ConnectedXMResponse<Invoice[]>>;
13666
+ declare const GetInvoices: ({ pageParam, pageSize, orderBy, search, adminApiParams, accountId, eventId, status, }: GetInvoicesProps) => Promise<ConnectedXMResponse<Invoice[]>>;
13660
13667
  /**
13661
13668
  * @category Hooks
13662
13669
  * @group Invoices
13663
13670
  */
13664
- declare const useGetInvoices: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetInvoices>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Invoice[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
13671
+ declare const useGetInvoices: (status?: keyof typeof InvoiceStatus, accountId?: string, eventId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetInvoices>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Invoice[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
13665
13672
 
13666
13673
  /**
13667
13674
  * @category Keys
package/dist/index.js CHANGED
@@ -10799,7 +10799,7 @@ var GetEventSessionAccesses = async ({
10799
10799
  pageSize: pageSize || void 0,
10800
10800
  orderBy: orderBy || void 0,
10801
10801
  search: search || void 0,
10802
- purchaseStatus: purchaseStatus || void 0
10802
+ status: purchaseStatus || void 0
10803
10803
  }
10804
10804
  }
10805
10805
  );
@@ -13883,7 +13883,13 @@ var useGetInterestGroups = (interestId = "", params = {}, options = {}) => {
13883
13883
  };
13884
13884
 
13885
13885
  // src/queries/invoices/useGetInvoices.ts
13886
- var INVOICES_QUERY_KEY = () => ["INVOICES"];
13886
+ var INVOICES_QUERY_KEY = (status, accountId, eventId) => {
13887
+ const key = ["INVOICES"];
13888
+ if (status) key.push(status);
13889
+ if (accountId) key.push(accountId);
13890
+ if (eventId) key.push(eventId);
13891
+ return key;
13892
+ };
13887
13893
  var SET_INVOICES_QUERY_DATA = (client, keyParams, response) => {
13888
13894
  client.setQueryData(INVOICES_QUERY_KEY(...keyParams), response);
13889
13895
  };
@@ -13892,7 +13898,10 @@ var GetInvoices = async ({
13892
13898
  pageSize,
13893
13899
  orderBy,
13894
13900
  search,
13895
- adminApiParams
13901
+ adminApiParams,
13902
+ accountId,
13903
+ eventId,
13904
+ status
13896
13905
  }) => {
13897
13906
  const adminApi = await GetAdminAPI(adminApiParams);
13898
13907
  const { data } = await adminApi.get(`/invoices`, {
@@ -13900,15 +13909,18 @@ var GetInvoices = async ({
13900
13909
  page: pageParam || void 0,
13901
13910
  pageSize: pageSize || void 0,
13902
13911
  orderBy: orderBy || void 0,
13903
- search: search || void 0
13912
+ search: search || void 0,
13913
+ status: status || void 0,
13914
+ accountId: accountId || void 0,
13915
+ eventId: eventId || void 0
13904
13916
  }
13905
13917
  });
13906
13918
  return data;
13907
13919
  };
13908
- var useGetInvoices = (params = {}, options = {}) => {
13920
+ var useGetInvoices = (status, accountId, eventId, params = {}, options = {}) => {
13909
13921
  return useConnectedInfiniteQuery(
13910
- INVOICES_QUERY_KEY(),
13911
- (params2) => GetInvoices(params2),
13922
+ INVOICES_QUERY_KEY(status, accountId, eventId),
13923
+ (params2) => GetInvoices({ ...params2, accountId, eventId, status }),
13912
13924
  params,
13913
13925
  options,
13914
13926
  "invoices"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "2.10.1",
3
+ "version": "2.10.3",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",