@connectedxm/client 0.4.6 → 0.4.7

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
@@ -2068,12 +2068,13 @@ interface GetSeriesProps extends SingleQueryParams {
2068
2068
  declare const GetSeries: ({ seriesId, clientApiParams, }: GetSeriesProps) => Promise<ConnectedXMResponse<Series>>;
2069
2069
  declare const useGetSeries: (seriesId?: string, options?: SingleQueryOptions<ReturnType<typeof GetSeries>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Series>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2070
2070
 
2071
- declare const SERIES_EVENTS_QUERY_KEY: (seriesId: string) => QueryKey;
2072
- declare const SET_SERIES_EVENTS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SERIES_EVENTS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSeriesEvents>>, baseKeys?: [locale: string, search?: string | undefined]) => void;
2071
+ declare const SERIES_EVENTS_QUERY_KEY: (seriesId: string, past?: boolean) => QueryKey;
2072
+ declare const SET_SERIES_EVENTS_QUERY_DATA: (client: QueryClient, keyParams: [seriesId: string, past?: boolean | undefined], response: Awaited<ReturnType<typeof GetSeriesEvents>>, baseKeys?: [locale: string, search?: string | undefined]) => void;
2073
2073
  interface GetSeriesEventsProps extends InfiniteQueryParams {
2074
2074
  seriesId: string;
2075
+ past?: boolean;
2075
2076
  }
2076
- declare const GetSeriesEvents: ({ seriesId, pageParam, pageSize, orderBy, search, queryClient, clientApiParams, locale, }: GetSeriesEventsProps) => Promise<ConnectedXMResponse<Event[]>>;
2077
+ declare const GetSeriesEvents: ({ seriesId, pageParam, pageSize, orderBy, search, past, queryClient, clientApiParams, locale, }: GetSeriesEventsProps) => Promise<ConnectedXMResponse<Event[]>>;
2077
2078
  declare const useGetSeriesEvents: (seriesId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSeriesEvents>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Event[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2078
2079
 
2079
2080
  declare const SERIES_LIST_QUERY_KEY: () => QueryKey;
package/dist/index.d.ts CHANGED
@@ -2068,12 +2068,13 @@ interface GetSeriesProps extends SingleQueryParams {
2068
2068
  declare const GetSeries: ({ seriesId, clientApiParams, }: GetSeriesProps) => Promise<ConnectedXMResponse<Series>>;
2069
2069
  declare const useGetSeries: (seriesId?: string, options?: SingleQueryOptions<ReturnType<typeof GetSeries>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Series>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
2070
2070
 
2071
- declare const SERIES_EVENTS_QUERY_KEY: (seriesId: string) => QueryKey;
2072
- declare const SET_SERIES_EVENTS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SERIES_EVENTS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSeriesEvents>>, baseKeys?: [locale: string, search?: string | undefined]) => void;
2071
+ declare const SERIES_EVENTS_QUERY_KEY: (seriesId: string, past?: boolean) => QueryKey;
2072
+ declare const SET_SERIES_EVENTS_QUERY_DATA: (client: QueryClient, keyParams: [seriesId: string, past?: boolean | undefined], response: Awaited<ReturnType<typeof GetSeriesEvents>>, baseKeys?: [locale: string, search?: string | undefined]) => void;
2073
2073
  interface GetSeriesEventsProps extends InfiniteQueryParams {
2074
2074
  seriesId: string;
2075
+ past?: boolean;
2075
2076
  }
2076
- declare const GetSeriesEvents: ({ seriesId, pageParam, pageSize, orderBy, search, queryClient, clientApiParams, locale, }: GetSeriesEventsProps) => Promise<ConnectedXMResponse<Event[]>>;
2077
+ declare const GetSeriesEvents: ({ seriesId, pageParam, pageSize, orderBy, search, past, queryClient, clientApiParams, locale, }: GetSeriesEventsProps) => Promise<ConnectedXMResponse<Event[]>>;
2077
2078
  declare const useGetSeriesEvents: (seriesId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSeriesEvents>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Event[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2078
2079
 
2079
2080
  declare const SERIES_LIST_QUERY_KEY: () => QueryKey;
package/dist/index.js CHANGED
@@ -4953,10 +4953,13 @@ var useGetSeries = (seriesId = "", options = {}) => {
4953
4953
  };
4954
4954
 
4955
4955
  // src/queries/series/useGetSeriesEvents.ts
4956
- var SERIES_EVENTS_QUERY_KEY = (seriesId) => [
4957
- ...SERIES_QUERY_KEY(seriesId),
4958
- "EVENTS"
4959
- ];
4956
+ var SERIES_EVENTS_QUERY_KEY = (seriesId, past) => {
4957
+ const keys = [...SERIES_QUERY_KEY(seriesId), "EVENTS"];
4958
+ if (typeof past !== "undefined") {
4959
+ keys.push(past ? "PAST" : "UPCOMING");
4960
+ }
4961
+ return keys;
4962
+ };
4960
4963
  var SET_SERIES_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4961
4964
  client.setQueryData(
4962
4965
  [
@@ -4972,6 +4975,7 @@ var GetSeriesEvents = async ({
4972
4975
  pageSize,
4973
4976
  orderBy,
4974
4977
  search,
4978
+ past,
4975
4979
  queryClient,
4976
4980
  clientApiParams,
4977
4981
  locale
@@ -4982,7 +4986,8 @@ var GetSeriesEvents = async ({
4982
4986
  page: pageParam || void 0,
4983
4987
  pageSize: pageSize || void 0,
4984
4988
  orderBy: orderBy || void 0,
4985
- search: search || void 0
4989
+ search: search || void 0,
4990
+ past: past !== void 0 ? past : void 0
4986
4991
  }
4987
4992
  });
4988
4993
  if (queryClient && data.status === "ok") {
package/dist/index.mjs CHANGED
@@ -4315,10 +4315,13 @@ var useGetSeries = (seriesId = "", options = {}) => {
4315
4315
  };
4316
4316
 
4317
4317
  // src/queries/series/useGetSeriesEvents.ts
4318
- var SERIES_EVENTS_QUERY_KEY = (seriesId) => [
4319
- ...SERIES_QUERY_KEY(seriesId),
4320
- "EVENTS"
4321
- ];
4318
+ var SERIES_EVENTS_QUERY_KEY = (seriesId, past) => {
4319
+ const keys = [...SERIES_QUERY_KEY(seriesId), "EVENTS"];
4320
+ if (typeof past !== "undefined") {
4321
+ keys.push(past ? "PAST" : "UPCOMING");
4322
+ }
4323
+ return keys;
4324
+ };
4322
4325
  var SET_SERIES_EVENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
4323
4326
  client.setQueryData(
4324
4327
  [
@@ -4334,6 +4337,7 @@ var GetSeriesEvents = async ({
4334
4337
  pageSize,
4335
4338
  orderBy,
4336
4339
  search,
4340
+ past,
4337
4341
  queryClient,
4338
4342
  clientApiParams,
4339
4343
  locale
@@ -4344,7 +4348,8 @@ var GetSeriesEvents = async ({
4344
4348
  page: pageParam || void 0,
4345
4349
  pageSize: pageSize || void 0,
4346
4350
  orderBy: orderBy || void 0,
4347
- search: search || void 0
4351
+ search: search || void 0,
4352
+ past: past !== void 0 ? past : void 0
4348
4353
  }
4349
4354
  });
4350
4355
  if (queryClient && data.status === "ok") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "0.4.6",
3
+ "version": "0.4.7",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {