@connectedxm/client 6.6.2 → 6.6.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.d.ts +4 -3
- package/dist/index.js +9 -4
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -4404,16 +4404,17 @@ interface GetChannelContentParams extends SingleQueryParams {
|
|
|
4404
4404
|
declare const GetChannelContent: ({ contentId, channelId, clientApiParams, }: GetChannelContentParams) => Promise<ConnectedXMResponse<Content>>;
|
|
4405
4405
|
declare const useGetChannelContent: (channelId?: string, contentId?: string, options?: SingleQueryOptions<ReturnType<typeof GetChannelContent>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Content>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
|
|
4406
4406
|
|
|
4407
|
-
declare const CHANNEL_CONTENTS_QUERY_KEY: (channelId: string, type?: "video" | "audio" | "article", featured?: boolean, past?: boolean) => QueryKey;
|
|
4407
|
+
declare const CHANNEL_CONTENTS_QUERY_KEY: (channelId: string, type?: "video" | "audio" | "article", featured?: boolean, past?: boolean, includeDrafts?: boolean) => QueryKey;
|
|
4408
4408
|
declare const SET_CHANNEL_CONTENTS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof CHANNEL_CONTENTS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetChannelContents>>, baseKeys?: Parameters<typeof GetBaseInfiniteQueryKeys>) => void;
|
|
4409
4409
|
interface GetChannelContentsParams extends InfiniteQueryParams {
|
|
4410
4410
|
channelId: string;
|
|
4411
4411
|
type?: "video" | "audio" | "article";
|
|
4412
4412
|
featured?: boolean;
|
|
4413
4413
|
past?: boolean;
|
|
4414
|
+
includeDrafts?: boolean;
|
|
4414
4415
|
}
|
|
4415
|
-
declare const GetChannelContents: ({ channelId, type, featured, past, pageParam, pageSize, orderBy, search, clientApiParams, }: GetChannelContentsParams) => Promise<ConnectedXMResponse<Content[]>>;
|
|
4416
|
-
declare const useGetChannelContents: (channelId?: string, type?: "video" | "audio" | "article", featured?: boolean, past?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetChannelContents>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Content[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
4416
|
+
declare const GetChannelContents: ({ channelId, type, featured, past, includeDrafts, pageParam, pageSize, orderBy, search, clientApiParams, }: GetChannelContentsParams) => Promise<ConnectedXMResponse<Content[]>>;
|
|
4417
|
+
declare const useGetChannelContents: (channelId?: string, type?: "video" | "audio" | "article", featured?: boolean, past?: boolean, includeDrafts?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetChannelContents>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Content[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
4417
4418
|
|
|
4418
4419
|
declare const CHANNEL_CONTENT_INTERESTS_QUERY_KEY: (channelId: string, contentId: string) => QueryKey;
|
|
4419
4420
|
interface GetChannelContentInterestsParams extends InfiniteQueryParams {
|
package/dist/index.js
CHANGED
|
@@ -1967,11 +1967,13 @@ var useGetChannelCollectionContents = (channelId, collectionId, params = {}, opt
|
|
|
1967
1967
|
};
|
|
1968
1968
|
|
|
1969
1969
|
// src/queries/channels/content/useGetChannelContents.ts
|
|
1970
|
-
var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past) => {
|
|
1970
|
+
var CHANNEL_CONTENTS_QUERY_KEY = (channelId, type, featured, past, includeDrafts) => {
|
|
1971
1971
|
const key = [...CHANNEL_QUERY_KEY(channelId), "CONTENTS"];
|
|
1972
1972
|
if (featured) key.push("FEATURED");
|
|
1973
1973
|
if (typeof past !== "undefined") key.push(past ? "PAST" : "UPCOMING");
|
|
1974
1974
|
if (type) key.push(type);
|
|
1975
|
+
if (typeof includeDrafts !== "undefined")
|
|
1976
|
+
key.push(includeDrafts ? "INCLUDE_DRAFTS" : "EXCLUDE_DRAFTS");
|
|
1975
1977
|
return key;
|
|
1976
1978
|
};
|
|
1977
1979
|
var SET_CHANNEL_CONTENTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
|
|
@@ -1988,6 +1990,7 @@ var GetChannelContents = async ({
|
|
|
1988
1990
|
type,
|
|
1989
1991
|
featured,
|
|
1990
1992
|
past,
|
|
1993
|
+
includeDrafts,
|
|
1991
1994
|
pageParam,
|
|
1992
1995
|
pageSize,
|
|
1993
1996
|
orderBy,
|
|
@@ -2000,6 +2003,7 @@ var GetChannelContents = async ({
|
|
|
2000
2003
|
type: type || void 0,
|
|
2001
2004
|
featured: featured || void 0,
|
|
2002
2005
|
past,
|
|
2006
|
+
includeDrafts: typeof includeDrafts !== "undefined" ? includeDrafts === true ? "true" : "false" : void 0,
|
|
2003
2007
|
page: pageParam || void 0,
|
|
2004
2008
|
pageSize: pageSize || void 0,
|
|
2005
2009
|
orderBy: orderBy || void 0,
|
|
@@ -2008,15 +2012,16 @@ var GetChannelContents = async ({
|
|
|
2008
2012
|
});
|
|
2009
2013
|
return data;
|
|
2010
2014
|
};
|
|
2011
|
-
var useGetChannelContents = (channelId = "", type, featured, past, params = {}, options = {}) => {
|
|
2015
|
+
var useGetChannelContents = (channelId = "", type, featured, past, includeDrafts, params = {}, options = {}) => {
|
|
2012
2016
|
return useConnectedInfiniteQuery(
|
|
2013
|
-
CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past),
|
|
2017
|
+
CHANNEL_CONTENTS_QUERY_KEY(channelId, type, featured, past, includeDrafts),
|
|
2014
2018
|
(params2) => GetChannelContents({
|
|
2015
2019
|
...params2,
|
|
2016
2020
|
channelId: channelId || "",
|
|
2017
2021
|
type,
|
|
2018
2022
|
featured,
|
|
2019
|
-
past
|
|
2023
|
+
past,
|
|
2024
|
+
includeDrafts
|
|
2020
2025
|
}),
|
|
2021
2026
|
params,
|
|
2022
2027
|
{
|