@connectedxm/admin 7.2.2 → 7.2.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
@@ -35,6 +35,7 @@ __export(index_exports, {
35
35
  ACCOUNT_ACTIVITIES_QUERY_KEY: () => ACCOUNT_ACTIVITIES_QUERY_KEY,
36
36
  ACCOUNT_ADDRESSES_QUERY_KEY: () => ACCOUNT_ADDRESSES_QUERY_KEY,
37
37
  ACCOUNT_ADDRESS_QUERY_KEY: () => ACCOUNT_ADDRESS_QUERY_KEY,
38
+ ACCOUNT_BOOKINGS_QUERY_KEY: () => ACCOUNT_BOOKINGS_QUERY_KEY,
38
39
  ACCOUNT_COMMENTS_QUERY_KEY: () => ACCOUNT_COMMENTS_QUERY_KEY,
39
40
  ACCOUNT_EMAILS_QUERY_KEY: () => ACCOUNT_EMAILS_QUERY_KEY,
40
41
  ACCOUNT_EVENTS_QUERY_KEY: () => ACCOUNT_EVENTS_QUERY_KEY,
@@ -793,6 +794,7 @@ __export(index_exports, {
793
794
  GetAccountActivities: () => GetAccountActivities,
794
795
  GetAccountAddress: () => GetAccountAddress,
795
796
  GetAccountAddresses: () => GetAccountAddresses,
797
+ GetAccountBookings: () => GetAccountBookings,
796
798
  GetAccountComments: () => GetAccountComments,
797
799
  GetAccountEvents: () => GetAccountEvents,
798
800
  GetAccountFollowers: () => GetAccountFollowers,
@@ -1567,6 +1569,7 @@ __export(index_exports, {
1567
1569
  SET_ACCOUNTS_QUERY_DATA: () => SET_ACCOUNTS_QUERY_DATA,
1568
1570
  SET_ACCOUNT_ACTIVITIES_QUERY_DATA: () => SET_ACCOUNT_ACTIVITIES_QUERY_DATA,
1569
1571
  SET_ACCOUNT_ADDRESSES_QUERY_DATA: () => SET_ACCOUNT_ADDRESSES_QUERY_DATA,
1572
+ SET_ACCOUNT_BOOKINGS_QUERY_DATA: () => SET_ACCOUNT_BOOKINGS_QUERY_DATA,
1570
1573
  SET_ACCOUNT_COMMENTS_QUERY_DATA: () => SET_ACCOUNT_COMMENTS_QUERY_DATA,
1571
1574
  SET_ACCOUNT_EMAILS_QUERY_DATA: () => SET_ACCOUNT_EMAILS_QUERY_DATA,
1572
1575
  SET_ACCOUNT_EVENTS_QUERY_DATA: () => SET_ACCOUNT_EVENTS_QUERY_DATA,
@@ -2758,6 +2761,7 @@ __export(index_exports, {
2758
2761
  useGetAccountActivities: () => useGetAccountActivities,
2759
2762
  useGetAccountAddress: () => useGetAccountAddress,
2760
2763
  useGetAccountAddresses: () => useGetAccountAddresses,
2764
+ useGetAccountBookings: () => useGetAccountBookings,
2761
2765
  useGetAccountComments: () => useGetAccountComments,
2762
2766
  useGetAccountEvents: () => useGetAccountEvents,
2763
2767
  useGetAccountFollowers: () => useGetAccountFollowers,
@@ -5453,6 +5457,45 @@ var useGetAccountRegistrations = (accountId = "", params = {}, options = {}) =>
5453
5457
  );
5454
5458
  };
5455
5459
 
5460
+ // src/queries/accounts/useGetAccountBookings.ts
5461
+ var ACCOUNT_BOOKINGS_QUERY_KEY = (accountId) => [
5462
+ ...ACCOUNT_QUERY_KEY(accountId),
5463
+ "BOOKINGS"
5464
+ ];
5465
+ var SET_ACCOUNT_BOOKINGS_QUERY_DATA = (client, keyParams, response) => {
5466
+ client.setQueryData(ACCOUNT_BOOKINGS_QUERY_KEY(...keyParams), response);
5467
+ };
5468
+ var GetAccountBookings = async ({
5469
+ accountId,
5470
+ pageParam,
5471
+ pageSize,
5472
+ orderBy,
5473
+ search,
5474
+ adminApiParams
5475
+ }) => {
5476
+ const adminApi = await GetAdminAPI(adminApiParams);
5477
+ const { data } = await adminApi.get(`/accounts/${accountId}/bookings`, {
5478
+ params: {
5479
+ page: pageParam || void 0,
5480
+ pageSize: pageSize || void 0,
5481
+ orderBy: orderBy || void 0,
5482
+ search: search || void 0
5483
+ }
5484
+ });
5485
+ return data;
5486
+ };
5487
+ var useGetAccountBookings = (accountId = "", params = {}, options = {}) => {
5488
+ return useConnectedInfiniteQuery(
5489
+ ACCOUNT_BOOKINGS_QUERY_KEY(accountId),
5490
+ (params2) => GetAccountBookings({ accountId, ...params2 }),
5491
+ params,
5492
+ {
5493
+ ...options,
5494
+ enabled: !!accountId && (options?.enabled ?? true)
5495
+ }
5496
+ );
5497
+ };
5498
+
5456
5499
  // src/queries/accounts/useGetAccountThreads.ts
5457
5500
  var ACCOUNT_THREADS_QUERY_KEY = (accountId) => {
5458
5501
  const keys = ["THREADS", "ACCOUNT", accountId];
@@ -43473,6 +43516,7 @@ var useUpdateTier = (options = {}) => {
43473
43516
  ACCOUNT_ACTIVITIES_QUERY_KEY,
43474
43517
  ACCOUNT_ADDRESSES_QUERY_KEY,
43475
43518
  ACCOUNT_ADDRESS_QUERY_KEY,
43519
+ ACCOUNT_BOOKINGS_QUERY_KEY,
43476
43520
  ACCOUNT_COMMENTS_QUERY_KEY,
43477
43521
  ACCOUNT_EMAILS_QUERY_KEY,
43478
43522
  ACCOUNT_EVENTS_QUERY_KEY,
@@ -44231,6 +44275,7 @@ var useUpdateTier = (options = {}) => {
44231
44275
  GetAccountActivities,
44232
44276
  GetAccountAddress,
44233
44277
  GetAccountAddresses,
44278
+ GetAccountBookings,
44234
44279
  GetAccountComments,
44235
44280
  GetAccountEvents,
44236
44281
  GetAccountFollowers,
@@ -45005,6 +45050,7 @@ var useUpdateTier = (options = {}) => {
45005
45050
  SET_ACCOUNTS_QUERY_DATA,
45006
45051
  SET_ACCOUNT_ACTIVITIES_QUERY_DATA,
45007
45052
  SET_ACCOUNT_ADDRESSES_QUERY_DATA,
45053
+ SET_ACCOUNT_BOOKINGS_QUERY_DATA,
45008
45054
  SET_ACCOUNT_COMMENTS_QUERY_DATA,
45009
45055
  SET_ACCOUNT_EMAILS_QUERY_DATA,
45010
45056
  SET_ACCOUNT_EVENTS_QUERY_DATA,
@@ -46196,6 +46242,7 @@ var useUpdateTier = (options = {}) => {
46196
46242
  useGetAccountActivities,
46197
46243
  useGetAccountAddress,
46198
46244
  useGetAccountAddresses,
46245
+ useGetAccountBookings,
46199
46246
  useGetAccountComments,
46200
46247
  useGetAccountEvents,
46201
46248
  useGetAccountFollowers,