@connectedxm/client 1.0.28 → 1.0.30

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.d.mts CHANGED
@@ -1914,7 +1914,7 @@ declare const SET_ACCOUNTS_QUERY_DATA: (client: QueryClient, keyParams: Paramete
1914
1914
  interface GetAccountsProps extends InfiniteQueryParams {
1915
1915
  accountType?: keyof typeof AccountType;
1916
1916
  }
1917
- declare const GetAccounts: ({ pageSize, orderBy, search, accountType, queryClient, clientApiParams, locale, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
1917
+ declare const GetAccounts: ({ pageParam, pageSize, orderBy, search, accountType, queryClient, clientApiParams, locale, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
1918
1918
  declare const useGetAccounts: (accountType?: keyof typeof AccountType, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
1919
1919
 
1920
1920
  declare const ACCOUNT_MEDIA_QUERY_KEY: (accountId: string, type?: "images" | "videos") => QueryKey;
@@ -2555,13 +2555,14 @@ interface GetSelfChatChannelsProps extends InfiniteQueryParams {
2555
2555
  declare const GetSelfChatChannels: ({ pageParam, pageSize, orderBy, search, queryClient, clientApiParams, locale, }: GetSelfChatChannelsProps) => Promise<ConnectedXMResponse<ChatChannelMember[]>>;
2556
2556
  declare const useGetSelfChatChannels: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSelfChatChannels>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<ChatChannelMember[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2557
2557
 
2558
- declare const SELF_EVENT_REGISTRATION_QUERY_KEY: (eventId: string, registrationId?: string) => QueryKey;
2558
+ declare const SELF_EVENT_REGISTRATION_QUERY_KEY: (eventId: string, registrationId?: string, create?: boolean) => QueryKey;
2559
2559
  declare const SET_SELF_EVENT_REGISTRATION_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SELF_EVENT_REGISTRATION_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSelfEventRegistration>>, baseKeys?: Parameters<typeof GetBaseSingleQueryKeys>) => void;
2560
2560
  interface GetSelfEventRegistrationProps extends SingleQueryParams {
2561
2561
  eventId: string;
2562
+ create: boolean;
2562
2563
  }
2563
- declare const GetSelfEventRegistration: ({ eventId, clientApiParams, }: GetSelfEventRegistrationProps) => Promise<ConnectedXMResponse<Registration>>;
2564
- declare const useGetSelfEventRegistration: (eventId: string, options?: SingleQueryOptions<ReturnType<typeof GetSelfEventRegistration>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Registration>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2564
+ declare const GetSelfEventRegistration: ({ eventId, create, clientApiParams, }: GetSelfEventRegistrationProps) => Promise<ConnectedXMResponse<Registration>>;
2565
+ declare const useGetSelfEventRegistration: (eventId: string, create?: boolean, options?: SingleQueryOptions<ReturnType<typeof GetSelfEventRegistration>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Registration>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2565
2566
 
2566
2567
  declare const SELF_EVENT_REGISTRATION_INTENT_QUERY_KEY: (eventId: string, registrationId: string) => unknown[];
2567
2568
  interface GetSelfEventRegistrationIntentProps extends SingleQueryParams {
package/dist/index.d.ts CHANGED
@@ -1914,7 +1914,7 @@ declare const SET_ACCOUNTS_QUERY_DATA: (client: QueryClient, keyParams: Paramete
1914
1914
  interface GetAccountsProps extends InfiniteQueryParams {
1915
1915
  accountType?: keyof typeof AccountType;
1916
1916
  }
1917
- declare const GetAccounts: ({ pageSize, orderBy, search, accountType, queryClient, clientApiParams, locale, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
1917
+ declare const GetAccounts: ({ pageParam, pageSize, orderBy, search, accountType, queryClient, clientApiParams, locale, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
1918
1918
  declare const useGetAccounts: (accountType?: keyof typeof AccountType, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
1919
1919
 
1920
1920
  declare const ACCOUNT_MEDIA_QUERY_KEY: (accountId: string, type?: "images" | "videos") => QueryKey;
@@ -2555,13 +2555,14 @@ interface GetSelfChatChannelsProps extends InfiniteQueryParams {
2555
2555
  declare const GetSelfChatChannels: ({ pageParam, pageSize, orderBy, search, queryClient, clientApiParams, locale, }: GetSelfChatChannelsProps) => Promise<ConnectedXMResponse<ChatChannelMember[]>>;
2556
2556
  declare const useGetSelfChatChannels: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSelfChatChannels>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<ChatChannelMember[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2557
2557
 
2558
- declare const SELF_EVENT_REGISTRATION_QUERY_KEY: (eventId: string, registrationId?: string) => QueryKey;
2558
+ declare const SELF_EVENT_REGISTRATION_QUERY_KEY: (eventId: string, registrationId?: string, create?: boolean) => QueryKey;
2559
2559
  declare const SET_SELF_EVENT_REGISTRATION_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SELF_EVENT_REGISTRATION_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSelfEventRegistration>>, baseKeys?: Parameters<typeof GetBaseSingleQueryKeys>) => void;
2560
2560
  interface GetSelfEventRegistrationProps extends SingleQueryParams {
2561
2561
  eventId: string;
2562
+ create: boolean;
2562
2563
  }
2563
- declare const GetSelfEventRegistration: ({ eventId, clientApiParams, }: GetSelfEventRegistrationProps) => Promise<ConnectedXMResponse<Registration>>;
2564
- declare const useGetSelfEventRegistration: (eventId: string, options?: SingleQueryOptions<ReturnType<typeof GetSelfEventRegistration>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Registration>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2564
+ declare const GetSelfEventRegistration: ({ eventId, create, clientApiParams, }: GetSelfEventRegistrationProps) => Promise<ConnectedXMResponse<Registration>>;
2565
+ declare const useGetSelfEventRegistration: (eventId: string, create?: boolean, options?: SingleQueryOptions<ReturnType<typeof GetSelfEventRegistration>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Registration>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2565
2566
 
2566
2567
  declare const SELF_EVENT_REGISTRATION_INTENT_QUERY_KEY: (eventId: string, registrationId: string) => unknown[];
2567
2568
  interface GetSelfEventRegistrationIntentProps extends SingleQueryParams {
package/dist/index.js CHANGED
@@ -1693,6 +1693,7 @@ var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =
1693
1693
  );
1694
1694
  };
1695
1695
  var GetAccounts = async ({
1696
+ pageParam,
1696
1697
  pageSize,
1697
1698
  orderBy,
1698
1699
  search,
@@ -1705,6 +1706,7 @@ var GetAccounts = async ({
1705
1706
  const { data } = await clientApi.get(`/accounts`, {
1706
1707
  params: {
1707
1708
  accountType: accountType || void 0,
1709
+ page: pageParam || void 0,
1708
1710
  pageSize: pageSize || void 0,
1709
1711
  orderBy: orderBy || void 0,
1710
1712
  search: search || void 0
@@ -5467,11 +5469,14 @@ var useGetSelfChatChannelMessages = (channelId = "", params = {}, options = {})
5467
5469
  };
5468
5470
 
5469
5471
  // src/queries/self/registration/useGetSelfEventRegistration.ts
5470
- var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId, registrationId) => {
5472
+ var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId, registrationId, create) => {
5471
5473
  const key = [...SELF_QUERY_KEY(), "EVENT_REGISTRATION", eventId];
5472
5474
  if (registrationId) {
5473
5475
  key.push(registrationId);
5474
5476
  }
5477
+ if (create) {
5478
+ key.push("CREATE");
5479
+ }
5475
5480
  return key;
5476
5481
  };
5477
5482
  var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -5485,21 +5490,24 @@ var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseK
5485
5490
  };
5486
5491
  var GetSelfEventRegistration = async ({
5487
5492
  eventId,
5493
+ create,
5488
5494
  clientApiParams
5489
5495
  }) => {
5490
5496
  const clientApi = await GetClientAPI(clientApiParams);
5491
- const { data } = await clientApi.get(
5492
- `/self/events/${eventId}/registration`,
5493
- {}
5494
- );
5497
+ const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
5498
+ params: {
5499
+ create: create ? "true" : "false"
5500
+ }
5501
+ });
5495
5502
  return data;
5496
5503
  };
5497
- var useGetSelfEventRegistration = (eventId, options = {}) => {
5504
+ var useGetSelfEventRegistration = (eventId, create = false, options = {}) => {
5498
5505
  const { authenticated } = useConnectedXM();
5499
5506
  return useConnectedSingleQuery_default(
5500
5507
  SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
5501
5508
  (params) => GetSelfEventRegistration({
5502
5509
  eventId,
5510
+ create,
5503
5511
  ...params
5504
5512
  }),
5505
5513
  {
package/dist/index.mjs CHANGED
@@ -728,6 +728,7 @@ var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) =
728
728
  );
729
729
  };
730
730
  var GetAccounts = async ({
731
+ pageParam,
731
732
  pageSize,
732
733
  orderBy,
733
734
  search,
@@ -740,6 +741,7 @@ var GetAccounts = async ({
740
741
  const { data } = await clientApi.get(`/accounts`, {
741
742
  params: {
742
743
  accountType: accountType || void 0,
744
+ page: pageParam || void 0,
743
745
  pageSize: pageSize || void 0,
744
746
  orderBy: orderBy || void 0,
745
747
  search: search || void 0
@@ -4502,11 +4504,14 @@ var useGetSelfChatChannelMessages = (channelId = "", params = {}, options = {})
4502
4504
  };
4503
4505
 
4504
4506
  // src/queries/self/registration/useGetSelfEventRegistration.ts
4505
- var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId, registrationId) => {
4507
+ var SELF_EVENT_REGISTRATION_QUERY_KEY = (eventId, registrationId, create) => {
4506
4508
  const key = [...SELF_QUERY_KEY(), "EVENT_REGISTRATION", eventId];
4507
4509
  if (registrationId) {
4508
4510
  key.push(registrationId);
4509
4511
  }
4512
+ if (create) {
4513
+ key.push("CREATE");
4514
+ }
4510
4515
  return key;
4511
4516
  };
4512
4517
  var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -4520,21 +4525,24 @@ var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseK
4520
4525
  };
4521
4526
  var GetSelfEventRegistration = async ({
4522
4527
  eventId,
4528
+ create,
4523
4529
  clientApiParams
4524
4530
  }) => {
4525
4531
  const clientApi = await GetClientAPI(clientApiParams);
4526
- const { data } = await clientApi.get(
4527
- `/self/events/${eventId}/registration`,
4528
- {}
4529
- );
4532
+ const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
4533
+ params: {
4534
+ create: create ? "true" : "false"
4535
+ }
4536
+ });
4530
4537
  return data;
4531
4538
  };
4532
- var useGetSelfEventRegistration = (eventId, options = {}) => {
4539
+ var useGetSelfEventRegistration = (eventId, create = false, options = {}) => {
4533
4540
  const { authenticated } = useConnectedXM();
4534
4541
  return useConnectedSingleQuery_default(
4535
4542
  SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
4536
4543
  (params) => GetSelfEventRegistration({
4537
4544
  eventId,
4545
+ create,
4538
4546
  ...params
4539
4547
  }),
4540
4548
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {