@connectedxm/admin 2.4.10 → 2.4.11
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 +17 -10
- package/dist/index.d.cts +13 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.js +17 -10
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -6171,18 +6171,22 @@ var GetChannelContentTranslations = async ({
|
|
|
6171
6171
|
pageSize,
|
|
6172
6172
|
orderBy,
|
|
6173
6173
|
search,
|
|
6174
|
+
channelId,
|
|
6174
6175
|
contentId,
|
|
6175
6176
|
adminApiParams
|
|
6176
6177
|
}) => {
|
|
6177
6178
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
6178
|
-
const { data } = await adminApi.get(
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6179
|
+
const { data } = await adminApi.get(
|
|
6180
|
+
`/channels/${channelId}/contents/${contentId}/translations`,
|
|
6181
|
+
{
|
|
6182
|
+
params: {
|
|
6183
|
+
page: pageParam || void 0,
|
|
6184
|
+
pageSize: pageSize || void 0,
|
|
6185
|
+
orderBy: orderBy || void 0,
|
|
6186
|
+
search: search || void 0
|
|
6187
|
+
}
|
|
6184
6188
|
}
|
|
6185
|
-
|
|
6189
|
+
);
|
|
6186
6190
|
return data;
|
|
6187
6191
|
};
|
|
6188
6192
|
var useGetChannelContentTranslations = (channelId = "", contentId = "", params = {}, options = {}) => {
|
|
@@ -6190,12 +6194,13 @@ var useGetChannelContentTranslations = (channelId = "", contentId = "", params =
|
|
|
6190
6194
|
CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY(channelId, contentId),
|
|
6191
6195
|
(params2) => GetChannelContentTranslations({
|
|
6192
6196
|
...params2,
|
|
6197
|
+
channelId,
|
|
6193
6198
|
contentId
|
|
6194
6199
|
}),
|
|
6195
6200
|
params,
|
|
6196
6201
|
{
|
|
6197
6202
|
...options,
|
|
6198
|
-
enabled: !!contentId
|
|
6203
|
+
enabled: !!channelId && !!contentId && (options.enabled ?? true)
|
|
6199
6204
|
},
|
|
6200
6205
|
"channels"
|
|
6201
6206
|
);
|
|
@@ -6210,13 +6215,14 @@ var SET_CHANNEL_CONTENT_TRANSLATION_QUERY_DATA = (client, keyParams, response) =
|
|
|
6210
6215
|
);
|
|
6211
6216
|
};
|
|
6212
6217
|
var GetChannelContentTranslation = async ({
|
|
6218
|
+
channelId,
|
|
6213
6219
|
contentId,
|
|
6214
6220
|
locale,
|
|
6215
6221
|
adminApiParams
|
|
6216
6222
|
}) => {
|
|
6217
6223
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
6218
6224
|
const { data } = await adminApi.get(
|
|
6219
|
-
`/contents/${contentId}/translations/${locale}`
|
|
6225
|
+
`/channels/${channelId}/contents/${contentId}/translations/${locale}`
|
|
6220
6226
|
);
|
|
6221
6227
|
return data;
|
|
6222
6228
|
};
|
|
@@ -6225,12 +6231,13 @@ var useGetChannelContentTranslation = (channelId = "", contentId = "", locale =
|
|
|
6225
6231
|
CHANNEL_CONTENT_TRANSLATION_QUERY_KEY(channelId, contentId, locale),
|
|
6226
6232
|
(params) => GetChannelContentTranslation({
|
|
6227
6233
|
...params,
|
|
6234
|
+
channelId,
|
|
6228
6235
|
contentId,
|
|
6229
6236
|
locale
|
|
6230
6237
|
}),
|
|
6231
6238
|
{
|
|
6232
6239
|
...options,
|
|
6233
|
-
enabled: !!channelId && !!contentId && !!locale && locale !== "en"
|
|
6240
|
+
enabled: !!channelId && !!contentId && !!locale && locale !== "en" && (options.enabled ?? true)
|
|
6234
6241
|
},
|
|
6235
6242
|
"channels"
|
|
6236
6243
|
);
|
package/dist/index.d.cts
CHANGED
|
@@ -600,6 +600,12 @@ interface ChannelContentTranslation {
|
|
|
600
600
|
title: string;
|
|
601
601
|
description: string | null;
|
|
602
602
|
body: string | null;
|
|
603
|
+
imageId: string | null;
|
|
604
|
+
image: BaseImage | null;
|
|
605
|
+
audioId: number | null;
|
|
606
|
+
audio: BaseFile | null;
|
|
607
|
+
videoId: string | null;
|
|
608
|
+
video: BaseVideo | null;
|
|
603
609
|
createdAt: string;
|
|
604
610
|
updatedAt: string;
|
|
605
611
|
}
|
|
@@ -3718,6 +3724,9 @@ interface ChannelContentTranslationUpdateInputs {
|
|
|
3718
3724
|
title?: string | null;
|
|
3719
3725
|
description?: string | null;
|
|
3720
3726
|
body?: string | null;
|
|
3727
|
+
imageId?: string | null;
|
|
3728
|
+
videoId?: string | null;
|
|
3729
|
+
audioId?: number | null;
|
|
3721
3730
|
}
|
|
3722
3731
|
interface ChannelContentUpdateInputs {
|
|
3723
3732
|
published?: string | null;
|
|
@@ -7176,6 +7185,7 @@ declare const CHANNEL_CONTENT_TRANSLATION_QUERY_KEY: (channelId: string, content
|
|
|
7176
7185
|
*/
|
|
7177
7186
|
declare const SET_CHANNEL_CONTENT_TRANSLATION_QUERY_DATA: (client: any, keyParams: Parameters<typeof CHANNEL_CONTENT_TRANSLATION_QUERY_KEY>, response: Awaited<ReturnType<typeof GetChannelContentTranslation>>) => void;
|
|
7178
7187
|
interface GetChannelContentTranslationProps extends SingleQueryParams {
|
|
7188
|
+
channelId: string;
|
|
7179
7189
|
contentId: string;
|
|
7180
7190
|
locale: string;
|
|
7181
7191
|
}
|
|
@@ -7183,7 +7193,7 @@ interface GetChannelContentTranslationProps extends SingleQueryParams {
|
|
|
7183
7193
|
* @category Queries
|
|
7184
7194
|
* @group Channels
|
|
7185
7195
|
*/
|
|
7186
|
-
declare const GetChannelContentTranslation: ({ contentId, locale, adminApiParams, }: GetChannelContentTranslationProps) => Promise<ConnectedXMResponse<ChannelContentTranslation | null>>;
|
|
7196
|
+
declare const GetChannelContentTranslation: ({ channelId, contentId, locale, adminApiParams, }: GetChannelContentTranslationProps) => Promise<ConnectedXMResponse<ChannelContentTranslation | null>>;
|
|
7187
7197
|
/**
|
|
7188
7198
|
* @category Hooks
|
|
7189
7199
|
* @group Channels
|
|
@@ -7201,13 +7211,14 @@ declare const CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY: (channelId: string, conten
|
|
|
7201
7211
|
*/
|
|
7202
7212
|
declare const SET_CHANNEL_CONTENT_TRANSLATIONS_QUERY_DATA: (client: any, keyParams: Parameters<typeof CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetChannelContentTranslations>>) => void;
|
|
7203
7213
|
interface GetChannelContentTranslationsProps extends InfiniteQueryParams {
|
|
7214
|
+
channelId: string;
|
|
7204
7215
|
contentId: string;
|
|
7205
7216
|
}
|
|
7206
7217
|
/**
|
|
7207
7218
|
* @category Queries
|
|
7208
7219
|
* @group Channels
|
|
7209
7220
|
*/
|
|
7210
|
-
declare const GetChannelContentTranslations: ({ pageParam, pageSize, orderBy, search, contentId, adminApiParams, }: GetChannelContentTranslationsProps) => Promise<ConnectedXMResponse<ChannelContentTranslation[]>>;
|
|
7221
|
+
declare const GetChannelContentTranslations: ({ pageParam, pageSize, orderBy, search, channelId, contentId, adminApiParams, }: GetChannelContentTranslationsProps) => Promise<ConnectedXMResponse<ChannelContentTranslation[]>>;
|
|
7211
7222
|
/**
|
|
7212
7223
|
* @category Hooks
|
|
7213
7224
|
* @group Channels
|
package/dist/index.d.ts
CHANGED
|
@@ -600,6 +600,12 @@ interface ChannelContentTranslation {
|
|
|
600
600
|
title: string;
|
|
601
601
|
description: string | null;
|
|
602
602
|
body: string | null;
|
|
603
|
+
imageId: string | null;
|
|
604
|
+
image: BaseImage | null;
|
|
605
|
+
audioId: number | null;
|
|
606
|
+
audio: BaseFile | null;
|
|
607
|
+
videoId: string | null;
|
|
608
|
+
video: BaseVideo | null;
|
|
603
609
|
createdAt: string;
|
|
604
610
|
updatedAt: string;
|
|
605
611
|
}
|
|
@@ -3718,6 +3724,9 @@ interface ChannelContentTranslationUpdateInputs {
|
|
|
3718
3724
|
title?: string | null;
|
|
3719
3725
|
description?: string | null;
|
|
3720
3726
|
body?: string | null;
|
|
3727
|
+
imageId?: string | null;
|
|
3728
|
+
videoId?: string | null;
|
|
3729
|
+
audioId?: number | null;
|
|
3721
3730
|
}
|
|
3722
3731
|
interface ChannelContentUpdateInputs {
|
|
3723
3732
|
published?: string | null;
|
|
@@ -7176,6 +7185,7 @@ declare const CHANNEL_CONTENT_TRANSLATION_QUERY_KEY: (channelId: string, content
|
|
|
7176
7185
|
*/
|
|
7177
7186
|
declare const SET_CHANNEL_CONTENT_TRANSLATION_QUERY_DATA: (client: any, keyParams: Parameters<typeof CHANNEL_CONTENT_TRANSLATION_QUERY_KEY>, response: Awaited<ReturnType<typeof GetChannelContentTranslation>>) => void;
|
|
7178
7187
|
interface GetChannelContentTranslationProps extends SingleQueryParams {
|
|
7188
|
+
channelId: string;
|
|
7179
7189
|
contentId: string;
|
|
7180
7190
|
locale: string;
|
|
7181
7191
|
}
|
|
@@ -7183,7 +7193,7 @@ interface GetChannelContentTranslationProps extends SingleQueryParams {
|
|
|
7183
7193
|
* @category Queries
|
|
7184
7194
|
* @group Channels
|
|
7185
7195
|
*/
|
|
7186
|
-
declare const GetChannelContentTranslation: ({ contentId, locale, adminApiParams, }: GetChannelContentTranslationProps) => Promise<ConnectedXMResponse<ChannelContentTranslation | null>>;
|
|
7196
|
+
declare const GetChannelContentTranslation: ({ channelId, contentId, locale, adminApiParams, }: GetChannelContentTranslationProps) => Promise<ConnectedXMResponse<ChannelContentTranslation | null>>;
|
|
7187
7197
|
/**
|
|
7188
7198
|
* @category Hooks
|
|
7189
7199
|
* @group Channels
|
|
@@ -7201,13 +7211,14 @@ declare const CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY: (channelId: string, conten
|
|
|
7201
7211
|
*/
|
|
7202
7212
|
declare const SET_CHANNEL_CONTENT_TRANSLATIONS_QUERY_DATA: (client: any, keyParams: Parameters<typeof CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetChannelContentTranslations>>) => void;
|
|
7203
7213
|
interface GetChannelContentTranslationsProps extends InfiniteQueryParams {
|
|
7214
|
+
channelId: string;
|
|
7204
7215
|
contentId: string;
|
|
7205
7216
|
}
|
|
7206
7217
|
/**
|
|
7207
7218
|
* @category Queries
|
|
7208
7219
|
* @group Channels
|
|
7209
7220
|
*/
|
|
7210
|
-
declare const GetChannelContentTranslations: ({ pageParam, pageSize, orderBy, search, contentId, adminApiParams, }: GetChannelContentTranslationsProps) => Promise<ConnectedXMResponse<ChannelContentTranslation[]>>;
|
|
7221
|
+
declare const GetChannelContentTranslations: ({ pageParam, pageSize, orderBy, search, channelId, contentId, adminApiParams, }: GetChannelContentTranslationsProps) => Promise<ConnectedXMResponse<ChannelContentTranslation[]>>;
|
|
7211
7222
|
/**
|
|
7212
7223
|
* @category Hooks
|
|
7213
7224
|
* @group Channels
|
package/dist/index.js
CHANGED
|
@@ -3219,18 +3219,22 @@ var GetChannelContentTranslations = async ({
|
|
|
3219
3219
|
pageSize,
|
|
3220
3220
|
orderBy,
|
|
3221
3221
|
search,
|
|
3222
|
+
channelId,
|
|
3222
3223
|
contentId,
|
|
3223
3224
|
adminApiParams
|
|
3224
3225
|
}) => {
|
|
3225
3226
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
3226
|
-
const { data } = await adminApi.get(
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3227
|
+
const { data } = await adminApi.get(
|
|
3228
|
+
`/channels/${channelId}/contents/${contentId}/translations`,
|
|
3229
|
+
{
|
|
3230
|
+
params: {
|
|
3231
|
+
page: pageParam || void 0,
|
|
3232
|
+
pageSize: pageSize || void 0,
|
|
3233
|
+
orderBy: orderBy || void 0,
|
|
3234
|
+
search: search || void 0
|
|
3235
|
+
}
|
|
3232
3236
|
}
|
|
3233
|
-
|
|
3237
|
+
);
|
|
3234
3238
|
return data;
|
|
3235
3239
|
};
|
|
3236
3240
|
var useGetChannelContentTranslations = (channelId = "", contentId = "", params = {}, options = {}) => {
|
|
@@ -3238,12 +3242,13 @@ var useGetChannelContentTranslations = (channelId = "", contentId = "", params =
|
|
|
3238
3242
|
CHANNEL_CONTENT_TRANSLATIONS_QUERY_KEY(channelId, contentId),
|
|
3239
3243
|
(params2) => GetChannelContentTranslations({
|
|
3240
3244
|
...params2,
|
|
3245
|
+
channelId,
|
|
3241
3246
|
contentId
|
|
3242
3247
|
}),
|
|
3243
3248
|
params,
|
|
3244
3249
|
{
|
|
3245
3250
|
...options,
|
|
3246
|
-
enabled: !!contentId
|
|
3251
|
+
enabled: !!channelId && !!contentId && (options.enabled ?? true)
|
|
3247
3252
|
},
|
|
3248
3253
|
"channels"
|
|
3249
3254
|
);
|
|
@@ -3258,13 +3263,14 @@ var SET_CHANNEL_CONTENT_TRANSLATION_QUERY_DATA = (client, keyParams, response) =
|
|
|
3258
3263
|
);
|
|
3259
3264
|
};
|
|
3260
3265
|
var GetChannelContentTranslation = async ({
|
|
3266
|
+
channelId,
|
|
3261
3267
|
contentId,
|
|
3262
3268
|
locale,
|
|
3263
3269
|
adminApiParams
|
|
3264
3270
|
}) => {
|
|
3265
3271
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
3266
3272
|
const { data } = await adminApi.get(
|
|
3267
|
-
`/contents/${contentId}/translations/${locale}`
|
|
3273
|
+
`/channels/${channelId}/contents/${contentId}/translations/${locale}`
|
|
3268
3274
|
);
|
|
3269
3275
|
return data;
|
|
3270
3276
|
};
|
|
@@ -3273,12 +3279,13 @@ var useGetChannelContentTranslation = (channelId = "", contentId = "", locale =
|
|
|
3273
3279
|
CHANNEL_CONTENT_TRANSLATION_QUERY_KEY(channelId, contentId, locale),
|
|
3274
3280
|
(params) => GetChannelContentTranslation({
|
|
3275
3281
|
...params,
|
|
3282
|
+
channelId,
|
|
3276
3283
|
contentId,
|
|
3277
3284
|
locale
|
|
3278
3285
|
}),
|
|
3279
3286
|
{
|
|
3280
3287
|
...options,
|
|
3281
|
-
enabled: !!channelId && !!contentId && !!locale && locale !== "en"
|
|
3288
|
+
enabled: !!channelId && !!contentId && !!locale && locale !== "en" && (options.enabled ?? true)
|
|
3282
3289
|
},
|
|
3283
3290
|
"channels"
|
|
3284
3291
|
);
|