@connectedxm/admin 1.7.7 → 1.7.8
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 +135 -1
- package/dist/index.d.ts +135 -1
- package/dist/index.js +195 -0
- package/dist/index.mjs +181 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -226,6 +226,7 @@ __export(src_exports, {
|
|
|
226
226
|
CreateEventFaqSectionQuestion: () => CreateEventFaqSectionQuestion,
|
|
227
227
|
CreateEventFaqSectionQuestionTranslation: () => CreateEventFaqSectionQuestionTranslation,
|
|
228
228
|
CreateEventFaqSectionTranslation: () => CreateEventFaqSectionTranslation,
|
|
229
|
+
CreateEventGalleryImage: () => CreateEventGalleryImage,
|
|
229
230
|
CreateEventPackage: () => CreateEventPackage,
|
|
230
231
|
CreateEventPackagePass: () => CreateEventPackagePass,
|
|
231
232
|
CreateEventPackageTranslation: () => CreateEventPackageTranslation,
|
|
@@ -330,6 +331,7 @@ __export(src_exports, {
|
|
|
330
331
|
DeleteEventFaqSectionQuestion: () => DeleteEventFaqSectionQuestion,
|
|
331
332
|
DeleteEventFaqSectionQuestionTranslation: () => DeleteEventFaqSectionQuestionTranslation,
|
|
332
333
|
DeleteEventFaqSectionTranslation: () => DeleteEventFaqSectionTranslation,
|
|
334
|
+
DeleteEventGalleryImage: () => DeleteEventGalleryImage,
|
|
333
335
|
DeleteEventPackage: () => DeleteEventPackage,
|
|
334
336
|
DeleteEventPackagePass: () => DeleteEventPackagePass,
|
|
335
337
|
DeleteEventPackageTranslation: () => DeleteEventPackageTranslation,
|
|
@@ -435,6 +437,8 @@ __export(src_exports, {
|
|
|
435
437
|
EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_KEY: () => EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_KEY,
|
|
436
438
|
EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_KEY: () => EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_KEY,
|
|
437
439
|
EVENT_FAQ_SECTION_TRANSLATION_QUERY_KEY: () => EVENT_FAQ_SECTION_TRANSLATION_QUERY_KEY,
|
|
440
|
+
EVENT_GALLERY_IMAGES_QUERY_KEY: () => EVENT_GALLERY_IMAGES_QUERY_KEY,
|
|
441
|
+
EVENT_GALLERY_IMAGE_QUERY_KEY: () => EVENT_GALLERY_IMAGE_QUERY_KEY,
|
|
438
442
|
EVENT_ON_SITE_QUERY_KEY: () => EVENT_ON_SITE_QUERY_KEY,
|
|
439
443
|
EVENT_PACKAGES_QUERY_KEY: () => EVENT_PACKAGES_QUERY_KEY,
|
|
440
444
|
EVENT_PACKAGE_PASSES_QUERY_KEY: () => EVENT_PACKAGE_PASSES_QUERY_KEY,
|
|
@@ -697,6 +701,8 @@ __export(src_exports, {
|
|
|
697
701
|
GetEventFaqSectionTranslation: () => GetEventFaqSectionTranslation,
|
|
698
702
|
GetEventFaqSectionTranslations: () => GetEventFaqSectionTranslations,
|
|
699
703
|
GetEventFaqSections: () => GetEventFaqSections,
|
|
704
|
+
GetEventGalleryImage: () => GetEventGalleryImage,
|
|
705
|
+
GetEventGalleryImages: () => GetEventGalleryImages,
|
|
700
706
|
GetEventOnSite: () => GetEventOnSite,
|
|
701
707
|
GetEventPackage: () => GetEventPackage,
|
|
702
708
|
GetEventPackagePass: () => GetEventPackagePass,
|
|
@@ -1180,6 +1186,8 @@ __export(src_exports, {
|
|
|
1180
1186
|
SET_EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_DATA,
|
|
1181
1187
|
SET_EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_DATA,
|
|
1182
1188
|
SET_EVENT_FAQ_SECTION_TRANSLATION_QUERY_DATA: () => SET_EVENT_FAQ_SECTION_TRANSLATION_QUERY_DATA,
|
|
1189
|
+
SET_EVENT_GALLERY_IMAGES_QUERY_DATA: () => SET_EVENT_GALLERY_IMAGES_QUERY_DATA,
|
|
1190
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA: () => SET_EVENT_GALLERY_IMAGE_QUERY_DATA,
|
|
1183
1191
|
SET_EVENT_ON_SITE_QUERY_DATA: () => SET_EVENT_ON_SITE_QUERY_DATA,
|
|
1184
1192
|
SET_EVENT_PACKAGES_QUERY_DATA: () => SET_EVENT_PACKAGES_QUERY_DATA,
|
|
1185
1193
|
SET_EVENT_PACKAGE_PASSES_QUERY_DATA: () => SET_EVENT_PACKAGE_PASSES_QUERY_DATA,
|
|
@@ -1480,6 +1488,7 @@ __export(src_exports, {
|
|
|
1480
1488
|
UpdateEventFaqSectionQuestion: () => UpdateEventFaqSectionQuestion,
|
|
1481
1489
|
UpdateEventFaqSectionQuestionTranslation: () => UpdateEventFaqSectionQuestionTranslation,
|
|
1482
1490
|
UpdateEventFaqSectionTranslation: () => UpdateEventFaqSectionTranslation,
|
|
1491
|
+
UpdateEventGalleryImage: () => UpdateEventGalleryImage,
|
|
1483
1492
|
UpdateEventPackage: () => UpdateEventPackage,
|
|
1484
1493
|
UpdateEventPackagePass: () => UpdateEventPackagePass,
|
|
1485
1494
|
UpdateEventPackageTranslation: () => UpdateEventPackageTranslation,
|
|
@@ -1664,6 +1673,7 @@ __export(src_exports, {
|
|
|
1664
1673
|
useCreateEventFaqSectionQuestion: () => useCreateEventFaqSectionQuestion,
|
|
1665
1674
|
useCreateEventFaqSectionQuestionTranslation: () => useCreateEventFaqSectionQuestionTranslation,
|
|
1666
1675
|
useCreateEventFaqSectionTranslation: () => useCreateEventFaqSectionTranslation,
|
|
1676
|
+
useCreateEventGalleryImage: () => useCreateEventGalleryImage,
|
|
1667
1677
|
useCreateEventPackage: () => useCreateEventPackage,
|
|
1668
1678
|
useCreateEventPackagePass: () => useCreateEventPackagePass,
|
|
1669
1679
|
useCreateEventPackageTranslation: () => useCreateEventPackageTranslation,
|
|
@@ -1761,6 +1771,7 @@ __export(src_exports, {
|
|
|
1761
1771
|
useDeleteEventFaqSectionQuestion: () => useDeleteEventFaqSectionQuestion,
|
|
1762
1772
|
useDeleteEventFaqSectionQuestionTranslation: () => useDeleteEventFaqSectionQuestionTranslation,
|
|
1763
1773
|
useDeleteEventFaqSectionTranslation: () => useDeleteEventFaqSectionTranslation,
|
|
1774
|
+
useDeleteEventGalleryImage: () => useDeleteEventGalleryImage,
|
|
1764
1775
|
useDeleteEventPackage: () => useDeleteEventPackage,
|
|
1765
1776
|
useDeleteEventPackagePass: () => useDeleteEventPackagePass,
|
|
1766
1777
|
useDeleteEventPackageTranslation: () => useDeleteEventPackageTranslation,
|
|
@@ -1961,6 +1972,8 @@ __export(src_exports, {
|
|
|
1961
1972
|
useGetEventFaqSectionTranslation: () => useGetEventFaqSectionTranslation,
|
|
1962
1973
|
useGetEventFaqSectionTranslations: () => useGetEventFaqSectionTranslations,
|
|
1963
1974
|
useGetEventFaqSections: () => useGetEventFaqSections,
|
|
1975
|
+
useGetEventGalleryImage: () => useGetEventGalleryImage,
|
|
1976
|
+
useGetEventGalleryImages: () => useGetEventGalleryImages,
|
|
1964
1977
|
useGetEventOnSite: () => useGetEventOnSite,
|
|
1965
1978
|
useGetEventPackage: () => useGetEventPackage,
|
|
1966
1979
|
useGetEventPackagePass: () => useGetEventPackagePass,
|
|
@@ -2280,6 +2293,7 @@ __export(src_exports, {
|
|
|
2280
2293
|
useUpdateEventFaqSectionQuestion: () => useUpdateEventFaqSectionQuestion,
|
|
2281
2294
|
useUpdateEventFaqSectionQuestionTranslation: () => useUpdateEventFaqSectionQuestionTranslation,
|
|
2282
2295
|
useUpdateEventFaqSectionTranslation: () => useUpdateEventFaqSectionTranslation,
|
|
2296
|
+
useUpdateEventGalleryImage: () => useUpdateEventGalleryImage,
|
|
2283
2297
|
useUpdateEventPackage: () => useUpdateEventPackage,
|
|
2284
2298
|
useUpdateEventPackagePass: () => useUpdateEventPackagePass,
|
|
2285
2299
|
useUpdateEventPackageTranslation: () => useUpdateEventPackageTranslation,
|
|
@@ -8415,6 +8429,77 @@ var useGetEventFaqSectionTranslation = (eventId = "", sectionId = "", locale = "
|
|
|
8415
8429
|
);
|
|
8416
8430
|
};
|
|
8417
8431
|
|
|
8432
|
+
// src/queries/events/galleryImages/useGetEventGalleryImages.ts
|
|
8433
|
+
var EVENT_GALLERY_IMAGES_QUERY_KEY = (eventId) => [
|
|
8434
|
+
...EVENT_QUERY_KEY(eventId),
|
|
8435
|
+
"GALLERY_IMAGES"
|
|
8436
|
+
];
|
|
8437
|
+
var SET_EVENT_GALLERY_IMAGES_QUERY_DATA = (client, keyParams, response) => {
|
|
8438
|
+
client.setQueryData(EVENT_GALLERY_IMAGES_QUERY_KEY(...keyParams), response);
|
|
8439
|
+
};
|
|
8440
|
+
var GetEventGalleryImages = async ({
|
|
8441
|
+
eventId,
|
|
8442
|
+
pageParam,
|
|
8443
|
+
pageSize,
|
|
8444
|
+
orderBy,
|
|
8445
|
+
search,
|
|
8446
|
+
adminApiParams
|
|
8447
|
+
}) => {
|
|
8448
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
8449
|
+
const { data } = await adminApi.get(`/events/${eventId}/images`, {
|
|
8450
|
+
params: {
|
|
8451
|
+
page: pageParam || void 0,
|
|
8452
|
+
pageSize: pageSize || void 0,
|
|
8453
|
+
orderBy: orderBy || void 0,
|
|
8454
|
+
search: search || void 0
|
|
8455
|
+
}
|
|
8456
|
+
});
|
|
8457
|
+
return data;
|
|
8458
|
+
};
|
|
8459
|
+
var useGetEventGalleryImages = (eventId = "", params = {}, options = {}) => {
|
|
8460
|
+
return useConnectedInfiniteQuery(
|
|
8461
|
+
EVENT_GALLERY_IMAGES_QUERY_KEY(eventId),
|
|
8462
|
+
(params2) => GetEventGalleryImages({
|
|
8463
|
+
...params2,
|
|
8464
|
+
eventId
|
|
8465
|
+
}),
|
|
8466
|
+
params,
|
|
8467
|
+
{
|
|
8468
|
+
...options,
|
|
8469
|
+
enabled: !!eventId && (options.enabled ?? true)
|
|
8470
|
+
},
|
|
8471
|
+
"events"
|
|
8472
|
+
);
|
|
8473
|
+
};
|
|
8474
|
+
|
|
8475
|
+
// src/queries/events/galleryImages/useGetEventGalleryImage.ts
|
|
8476
|
+
var EVENT_GALLERY_IMAGE_QUERY_KEY = (eventId, galleryImageId) => [...EVENT_GALLERY_IMAGES_QUERY_KEY(eventId), galleryImageId];
|
|
8477
|
+
var SET_EVENT_GALLERY_IMAGE_QUERY_DATA = (client, keyParams, response) => {
|
|
8478
|
+
client.setQueryData(EVENT_GALLERY_IMAGE_QUERY_KEY(...keyParams), response);
|
|
8479
|
+
};
|
|
8480
|
+
var GetEventGalleryImage = async ({
|
|
8481
|
+
eventId,
|
|
8482
|
+
galleryImageId,
|
|
8483
|
+
adminApiParams
|
|
8484
|
+
}) => {
|
|
8485
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
8486
|
+
const { data } = await adminApi.get(
|
|
8487
|
+
`/events/${eventId}/images/${galleryImageId}`
|
|
8488
|
+
);
|
|
8489
|
+
return data;
|
|
8490
|
+
};
|
|
8491
|
+
var useGetEventGalleryImage = (eventId = "", galleryImageId = "", options = {}) => {
|
|
8492
|
+
return useConnectedSingleQuery(
|
|
8493
|
+
EVENT_GALLERY_IMAGE_QUERY_KEY(eventId, galleryImageId),
|
|
8494
|
+
(params) => GetEventGalleryImage({ eventId, galleryImageId, ...params }),
|
|
8495
|
+
{
|
|
8496
|
+
...options,
|
|
8497
|
+
enabled: !!eventId && !!galleryImageId && (options?.enabled ?? true)
|
|
8498
|
+
},
|
|
8499
|
+
"events"
|
|
8500
|
+
);
|
|
8501
|
+
};
|
|
8502
|
+
|
|
8418
8503
|
// src/queries/events/on-site/useGetEventOnSite.ts
|
|
8419
8504
|
var EVENT_ON_SITE_QUERY_KEY = (eventId) => [
|
|
8420
8505
|
...EVENTS_QUERY_KEY(),
|
|
@@ -21340,6 +21425,102 @@ var useUpdateEventFaqSectionQuestion = (options = {}) => {
|
|
|
21340
21425
|
});
|
|
21341
21426
|
};
|
|
21342
21427
|
|
|
21428
|
+
// src/mutations/event/galleryImages/useCreateEventGalleryImage.ts
|
|
21429
|
+
var CreateEventGalleryImage = async ({
|
|
21430
|
+
eventId,
|
|
21431
|
+
image,
|
|
21432
|
+
adminApiParams,
|
|
21433
|
+
queryClient
|
|
21434
|
+
}) => {
|
|
21435
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
21436
|
+
const { data } = await connectedXM.post(`/events/${eventId}/images`, image);
|
|
21437
|
+
if (queryClient && data.status === "ok") {
|
|
21438
|
+
queryClient.invalidateQueries({
|
|
21439
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
21440
|
+
});
|
|
21441
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA(
|
|
21442
|
+
queryClient,
|
|
21443
|
+
[eventId, data.data.id],
|
|
21444
|
+
data
|
|
21445
|
+
);
|
|
21446
|
+
}
|
|
21447
|
+
return data;
|
|
21448
|
+
};
|
|
21449
|
+
var useCreateEventGalleryImage = (options = {}) => {
|
|
21450
|
+
return useConnectedMutation(CreateEventGalleryImage, options, {
|
|
21451
|
+
domain: "events",
|
|
21452
|
+
type: "update"
|
|
21453
|
+
});
|
|
21454
|
+
};
|
|
21455
|
+
|
|
21456
|
+
// src/mutations/event/galleryImages/useDeleteEventGalleryImage.ts
|
|
21457
|
+
var DeleteEventGalleryImage = async ({
|
|
21458
|
+
eventId,
|
|
21459
|
+
galleryImageId,
|
|
21460
|
+
adminApiParams,
|
|
21461
|
+
queryClient
|
|
21462
|
+
}) => {
|
|
21463
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
21464
|
+
const { data } = await connectedXM.delete(
|
|
21465
|
+
`/events/${eventId}/images/${galleryImageId}`
|
|
21466
|
+
);
|
|
21467
|
+
if (queryClient && data.status === "ok") {
|
|
21468
|
+
queryClient.invalidateQueries({
|
|
21469
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
21470
|
+
});
|
|
21471
|
+
queryClient.removeQueries({
|
|
21472
|
+
queryKey: EVENT_GALLERY_IMAGE_QUERY_KEY(eventId, galleryImageId)
|
|
21473
|
+
});
|
|
21474
|
+
}
|
|
21475
|
+
return data;
|
|
21476
|
+
};
|
|
21477
|
+
var useDeleteEventGalleryImage = (options = {}) => {
|
|
21478
|
+
return useConnectedMutation(DeleteEventGalleryImage, options, {
|
|
21479
|
+
domain: "events",
|
|
21480
|
+
type: "update"
|
|
21481
|
+
});
|
|
21482
|
+
};
|
|
21483
|
+
|
|
21484
|
+
// src/mutations/event/galleryImages/useUpdateEventGalleryImage.ts
|
|
21485
|
+
var UpdateEventGalleryImage = async ({
|
|
21486
|
+
eventId,
|
|
21487
|
+
galleryImageId,
|
|
21488
|
+
image,
|
|
21489
|
+
adminApiParams,
|
|
21490
|
+
queryClient
|
|
21491
|
+
}) => {
|
|
21492
|
+
if (!galleryImageId) throw new Error("Image ID Undefined");
|
|
21493
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
21494
|
+
const { data } = await connectedXM.put(`/events/${eventId}/images/${galleryImageId}`, {
|
|
21495
|
+
...image,
|
|
21496
|
+
id: void 0,
|
|
21497
|
+
event: void 0,
|
|
21498
|
+
eventId: void 0,
|
|
21499
|
+
galleryImageId: void 0,
|
|
21500
|
+
_count: void 0,
|
|
21501
|
+
createdAt: void 0,
|
|
21502
|
+
updatedAt: void 0,
|
|
21503
|
+
image: void 0
|
|
21504
|
+
});
|
|
21505
|
+
if (queryClient && data.status === "ok") {
|
|
21506
|
+
queryClient.invalidateQueries({
|
|
21507
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
21508
|
+
});
|
|
21509
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA(
|
|
21510
|
+
queryClient,
|
|
21511
|
+
[eventId, galleryImageId || data.data?.id],
|
|
21512
|
+
data
|
|
21513
|
+
);
|
|
21514
|
+
}
|
|
21515
|
+
return data;
|
|
21516
|
+
};
|
|
21517
|
+
var useUpdateEventGalleryImage = (options = {}) => {
|
|
21518
|
+
return useConnectedMutation(UpdateEventGalleryImage, options, {
|
|
21519
|
+
domain: "events",
|
|
21520
|
+
type: "update"
|
|
21521
|
+
});
|
|
21522
|
+
};
|
|
21523
|
+
|
|
21343
21524
|
// src/mutations/event/on-site/useUpdateEventCheckinCode.ts
|
|
21344
21525
|
var UpdateEventCheckinCode = async ({
|
|
21345
21526
|
eventId,
|
|
@@ -29660,6 +29841,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
29660
29841
|
CreateEventFaqSectionQuestion,
|
|
29661
29842
|
CreateEventFaqSectionQuestionTranslation,
|
|
29662
29843
|
CreateEventFaqSectionTranslation,
|
|
29844
|
+
CreateEventGalleryImage,
|
|
29663
29845
|
CreateEventPackage,
|
|
29664
29846
|
CreateEventPackagePass,
|
|
29665
29847
|
CreateEventPackageTranslation,
|
|
@@ -29764,6 +29946,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
29764
29946
|
DeleteEventFaqSectionQuestion,
|
|
29765
29947
|
DeleteEventFaqSectionQuestionTranslation,
|
|
29766
29948
|
DeleteEventFaqSectionTranslation,
|
|
29949
|
+
DeleteEventGalleryImage,
|
|
29767
29950
|
DeleteEventPackage,
|
|
29768
29951
|
DeleteEventPackagePass,
|
|
29769
29952
|
DeleteEventPackageTranslation,
|
|
@@ -29869,6 +30052,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
29869
30052
|
EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_KEY,
|
|
29870
30053
|
EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_KEY,
|
|
29871
30054
|
EVENT_FAQ_SECTION_TRANSLATION_QUERY_KEY,
|
|
30055
|
+
EVENT_GALLERY_IMAGES_QUERY_KEY,
|
|
30056
|
+
EVENT_GALLERY_IMAGE_QUERY_KEY,
|
|
29872
30057
|
EVENT_ON_SITE_QUERY_KEY,
|
|
29873
30058
|
EVENT_PACKAGES_QUERY_KEY,
|
|
29874
30059
|
EVENT_PACKAGE_PASSES_QUERY_KEY,
|
|
@@ -30131,6 +30316,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
30131
30316
|
GetEventFaqSectionTranslation,
|
|
30132
30317
|
GetEventFaqSectionTranslations,
|
|
30133
30318
|
GetEventFaqSections,
|
|
30319
|
+
GetEventGalleryImage,
|
|
30320
|
+
GetEventGalleryImages,
|
|
30134
30321
|
GetEventOnSite,
|
|
30135
30322
|
GetEventPackage,
|
|
30136
30323
|
GetEventPackagePass,
|
|
@@ -30614,6 +30801,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
30614
30801
|
SET_EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_DATA,
|
|
30615
30802
|
SET_EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_DATA,
|
|
30616
30803
|
SET_EVENT_FAQ_SECTION_TRANSLATION_QUERY_DATA,
|
|
30804
|
+
SET_EVENT_GALLERY_IMAGES_QUERY_DATA,
|
|
30805
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA,
|
|
30617
30806
|
SET_EVENT_ON_SITE_QUERY_DATA,
|
|
30618
30807
|
SET_EVENT_PACKAGES_QUERY_DATA,
|
|
30619
30808
|
SET_EVENT_PACKAGE_PASSES_QUERY_DATA,
|
|
@@ -30914,6 +31103,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
30914
31103
|
UpdateEventFaqSectionQuestion,
|
|
30915
31104
|
UpdateEventFaqSectionQuestionTranslation,
|
|
30916
31105
|
UpdateEventFaqSectionTranslation,
|
|
31106
|
+
UpdateEventGalleryImage,
|
|
30917
31107
|
UpdateEventPackage,
|
|
30918
31108
|
UpdateEventPackagePass,
|
|
30919
31109
|
UpdateEventPackageTranslation,
|
|
@@ -31098,6 +31288,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
31098
31288
|
useCreateEventFaqSectionQuestion,
|
|
31099
31289
|
useCreateEventFaqSectionQuestionTranslation,
|
|
31100
31290
|
useCreateEventFaqSectionTranslation,
|
|
31291
|
+
useCreateEventGalleryImage,
|
|
31101
31292
|
useCreateEventPackage,
|
|
31102
31293
|
useCreateEventPackagePass,
|
|
31103
31294
|
useCreateEventPackageTranslation,
|
|
@@ -31195,6 +31386,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
31195
31386
|
useDeleteEventFaqSectionQuestion,
|
|
31196
31387
|
useDeleteEventFaqSectionQuestionTranslation,
|
|
31197
31388
|
useDeleteEventFaqSectionTranslation,
|
|
31389
|
+
useDeleteEventGalleryImage,
|
|
31198
31390
|
useDeleteEventPackage,
|
|
31199
31391
|
useDeleteEventPackagePass,
|
|
31200
31392
|
useDeleteEventPackageTranslation,
|
|
@@ -31395,6 +31587,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
31395
31587
|
useGetEventFaqSectionTranslation,
|
|
31396
31588
|
useGetEventFaqSectionTranslations,
|
|
31397
31589
|
useGetEventFaqSections,
|
|
31590
|
+
useGetEventGalleryImage,
|
|
31591
|
+
useGetEventGalleryImages,
|
|
31398
31592
|
useGetEventOnSite,
|
|
31399
31593
|
useGetEventPackage,
|
|
31400
31594
|
useGetEventPackagePass,
|
|
@@ -31714,6 +31908,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
31714
31908
|
useUpdateEventFaqSectionQuestion,
|
|
31715
31909
|
useUpdateEventFaqSectionQuestionTranslation,
|
|
31716
31910
|
useUpdateEventFaqSectionTranslation,
|
|
31911
|
+
useUpdateEventGalleryImage,
|
|
31717
31912
|
useUpdateEventPackage,
|
|
31718
31913
|
useUpdateEventPackagePass,
|
|
31719
31914
|
useUpdateEventPackageTranslation,
|
package/dist/index.mjs
CHANGED
|
@@ -6058,6 +6058,77 @@ var useGetEventFaqSectionTranslation = (eventId = "", sectionId = "", locale = "
|
|
|
6058
6058
|
);
|
|
6059
6059
|
};
|
|
6060
6060
|
|
|
6061
|
+
// src/queries/events/galleryImages/useGetEventGalleryImages.ts
|
|
6062
|
+
var EVENT_GALLERY_IMAGES_QUERY_KEY = (eventId) => [
|
|
6063
|
+
...EVENT_QUERY_KEY(eventId),
|
|
6064
|
+
"GALLERY_IMAGES"
|
|
6065
|
+
];
|
|
6066
|
+
var SET_EVENT_GALLERY_IMAGES_QUERY_DATA = (client, keyParams, response) => {
|
|
6067
|
+
client.setQueryData(EVENT_GALLERY_IMAGES_QUERY_KEY(...keyParams), response);
|
|
6068
|
+
};
|
|
6069
|
+
var GetEventGalleryImages = async ({
|
|
6070
|
+
eventId,
|
|
6071
|
+
pageParam,
|
|
6072
|
+
pageSize,
|
|
6073
|
+
orderBy,
|
|
6074
|
+
search,
|
|
6075
|
+
adminApiParams
|
|
6076
|
+
}) => {
|
|
6077
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
6078
|
+
const { data } = await adminApi.get(`/events/${eventId}/images`, {
|
|
6079
|
+
params: {
|
|
6080
|
+
page: pageParam || void 0,
|
|
6081
|
+
pageSize: pageSize || void 0,
|
|
6082
|
+
orderBy: orderBy || void 0,
|
|
6083
|
+
search: search || void 0
|
|
6084
|
+
}
|
|
6085
|
+
});
|
|
6086
|
+
return data;
|
|
6087
|
+
};
|
|
6088
|
+
var useGetEventGalleryImages = (eventId = "", params = {}, options = {}) => {
|
|
6089
|
+
return useConnectedInfiniteQuery(
|
|
6090
|
+
EVENT_GALLERY_IMAGES_QUERY_KEY(eventId),
|
|
6091
|
+
(params2) => GetEventGalleryImages({
|
|
6092
|
+
...params2,
|
|
6093
|
+
eventId
|
|
6094
|
+
}),
|
|
6095
|
+
params,
|
|
6096
|
+
{
|
|
6097
|
+
...options,
|
|
6098
|
+
enabled: !!eventId && (options.enabled ?? true)
|
|
6099
|
+
},
|
|
6100
|
+
"events"
|
|
6101
|
+
);
|
|
6102
|
+
};
|
|
6103
|
+
|
|
6104
|
+
// src/queries/events/galleryImages/useGetEventGalleryImage.ts
|
|
6105
|
+
var EVENT_GALLERY_IMAGE_QUERY_KEY = (eventId, galleryImageId) => [...EVENT_GALLERY_IMAGES_QUERY_KEY(eventId), galleryImageId];
|
|
6106
|
+
var SET_EVENT_GALLERY_IMAGE_QUERY_DATA = (client, keyParams, response) => {
|
|
6107
|
+
client.setQueryData(EVENT_GALLERY_IMAGE_QUERY_KEY(...keyParams), response);
|
|
6108
|
+
};
|
|
6109
|
+
var GetEventGalleryImage = async ({
|
|
6110
|
+
eventId,
|
|
6111
|
+
galleryImageId,
|
|
6112
|
+
adminApiParams
|
|
6113
|
+
}) => {
|
|
6114
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
6115
|
+
const { data } = await adminApi.get(
|
|
6116
|
+
`/events/${eventId}/images/${galleryImageId}`
|
|
6117
|
+
);
|
|
6118
|
+
return data;
|
|
6119
|
+
};
|
|
6120
|
+
var useGetEventGalleryImage = (eventId = "", galleryImageId = "", options = {}) => {
|
|
6121
|
+
return useConnectedSingleQuery(
|
|
6122
|
+
EVENT_GALLERY_IMAGE_QUERY_KEY(eventId, galleryImageId),
|
|
6123
|
+
(params) => GetEventGalleryImage({ eventId, galleryImageId, ...params }),
|
|
6124
|
+
{
|
|
6125
|
+
...options,
|
|
6126
|
+
enabled: !!eventId && !!galleryImageId && (options?.enabled ?? true)
|
|
6127
|
+
},
|
|
6128
|
+
"events"
|
|
6129
|
+
);
|
|
6130
|
+
};
|
|
6131
|
+
|
|
6061
6132
|
// src/queries/events/on-site/useGetEventOnSite.ts
|
|
6062
6133
|
var EVENT_ON_SITE_QUERY_KEY = (eventId) => [
|
|
6063
6134
|
...EVENTS_QUERY_KEY(),
|
|
@@ -18986,6 +19057,102 @@ var useUpdateEventFaqSectionQuestion = (options = {}) => {
|
|
|
18986
19057
|
});
|
|
18987
19058
|
};
|
|
18988
19059
|
|
|
19060
|
+
// src/mutations/event/galleryImages/useCreateEventGalleryImage.ts
|
|
19061
|
+
var CreateEventGalleryImage = async ({
|
|
19062
|
+
eventId,
|
|
19063
|
+
image,
|
|
19064
|
+
adminApiParams,
|
|
19065
|
+
queryClient
|
|
19066
|
+
}) => {
|
|
19067
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
19068
|
+
const { data } = await connectedXM.post(`/events/${eventId}/images`, image);
|
|
19069
|
+
if (queryClient && data.status === "ok") {
|
|
19070
|
+
queryClient.invalidateQueries({
|
|
19071
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
19072
|
+
});
|
|
19073
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA(
|
|
19074
|
+
queryClient,
|
|
19075
|
+
[eventId, data.data.id],
|
|
19076
|
+
data
|
|
19077
|
+
);
|
|
19078
|
+
}
|
|
19079
|
+
return data;
|
|
19080
|
+
};
|
|
19081
|
+
var useCreateEventGalleryImage = (options = {}) => {
|
|
19082
|
+
return useConnectedMutation(CreateEventGalleryImage, options, {
|
|
19083
|
+
domain: "events",
|
|
19084
|
+
type: "update"
|
|
19085
|
+
});
|
|
19086
|
+
};
|
|
19087
|
+
|
|
19088
|
+
// src/mutations/event/galleryImages/useDeleteEventGalleryImage.ts
|
|
19089
|
+
var DeleteEventGalleryImage = async ({
|
|
19090
|
+
eventId,
|
|
19091
|
+
galleryImageId,
|
|
19092
|
+
adminApiParams,
|
|
19093
|
+
queryClient
|
|
19094
|
+
}) => {
|
|
19095
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
19096
|
+
const { data } = await connectedXM.delete(
|
|
19097
|
+
`/events/${eventId}/images/${galleryImageId}`
|
|
19098
|
+
);
|
|
19099
|
+
if (queryClient && data.status === "ok") {
|
|
19100
|
+
queryClient.invalidateQueries({
|
|
19101
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
19102
|
+
});
|
|
19103
|
+
queryClient.removeQueries({
|
|
19104
|
+
queryKey: EVENT_GALLERY_IMAGE_QUERY_KEY(eventId, galleryImageId)
|
|
19105
|
+
});
|
|
19106
|
+
}
|
|
19107
|
+
return data;
|
|
19108
|
+
};
|
|
19109
|
+
var useDeleteEventGalleryImage = (options = {}) => {
|
|
19110
|
+
return useConnectedMutation(DeleteEventGalleryImage, options, {
|
|
19111
|
+
domain: "events",
|
|
19112
|
+
type: "update"
|
|
19113
|
+
});
|
|
19114
|
+
};
|
|
19115
|
+
|
|
19116
|
+
// src/mutations/event/galleryImages/useUpdateEventGalleryImage.ts
|
|
19117
|
+
var UpdateEventGalleryImage = async ({
|
|
19118
|
+
eventId,
|
|
19119
|
+
galleryImageId,
|
|
19120
|
+
image,
|
|
19121
|
+
adminApiParams,
|
|
19122
|
+
queryClient
|
|
19123
|
+
}) => {
|
|
19124
|
+
if (!galleryImageId) throw new Error("Image ID Undefined");
|
|
19125
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
19126
|
+
const { data } = await connectedXM.put(`/events/${eventId}/images/${galleryImageId}`, {
|
|
19127
|
+
...image,
|
|
19128
|
+
id: void 0,
|
|
19129
|
+
event: void 0,
|
|
19130
|
+
eventId: void 0,
|
|
19131
|
+
galleryImageId: void 0,
|
|
19132
|
+
_count: void 0,
|
|
19133
|
+
createdAt: void 0,
|
|
19134
|
+
updatedAt: void 0,
|
|
19135
|
+
image: void 0
|
|
19136
|
+
});
|
|
19137
|
+
if (queryClient && data.status === "ok") {
|
|
19138
|
+
queryClient.invalidateQueries({
|
|
19139
|
+
queryKey: EVENT_GALLERY_IMAGES_QUERY_KEY(eventId)
|
|
19140
|
+
});
|
|
19141
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA(
|
|
19142
|
+
queryClient,
|
|
19143
|
+
[eventId, galleryImageId || data.data?.id],
|
|
19144
|
+
data
|
|
19145
|
+
);
|
|
19146
|
+
}
|
|
19147
|
+
return data;
|
|
19148
|
+
};
|
|
19149
|
+
var useUpdateEventGalleryImage = (options = {}) => {
|
|
19150
|
+
return useConnectedMutation(UpdateEventGalleryImage, options, {
|
|
19151
|
+
domain: "events",
|
|
19152
|
+
type: "update"
|
|
19153
|
+
});
|
|
19154
|
+
};
|
|
19155
|
+
|
|
18989
19156
|
// src/mutations/event/on-site/useUpdateEventCheckinCode.ts
|
|
18990
19157
|
var UpdateEventCheckinCode = async ({
|
|
18991
19158
|
eventId,
|
|
@@ -27305,6 +27472,7 @@ export {
|
|
|
27305
27472
|
CreateEventFaqSectionQuestion,
|
|
27306
27473
|
CreateEventFaqSectionQuestionTranslation,
|
|
27307
27474
|
CreateEventFaqSectionTranslation,
|
|
27475
|
+
CreateEventGalleryImage,
|
|
27308
27476
|
CreateEventPackage,
|
|
27309
27477
|
CreateEventPackagePass,
|
|
27310
27478
|
CreateEventPackageTranslation,
|
|
@@ -27409,6 +27577,7 @@ export {
|
|
|
27409
27577
|
DeleteEventFaqSectionQuestion,
|
|
27410
27578
|
DeleteEventFaqSectionQuestionTranslation,
|
|
27411
27579
|
DeleteEventFaqSectionTranslation,
|
|
27580
|
+
DeleteEventGalleryImage,
|
|
27412
27581
|
DeleteEventPackage,
|
|
27413
27582
|
DeleteEventPackagePass,
|
|
27414
27583
|
DeleteEventPackageTranslation,
|
|
@@ -27514,6 +27683,8 @@ export {
|
|
|
27514
27683
|
EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_KEY,
|
|
27515
27684
|
EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_KEY,
|
|
27516
27685
|
EVENT_FAQ_SECTION_TRANSLATION_QUERY_KEY,
|
|
27686
|
+
EVENT_GALLERY_IMAGES_QUERY_KEY,
|
|
27687
|
+
EVENT_GALLERY_IMAGE_QUERY_KEY,
|
|
27517
27688
|
EVENT_ON_SITE_QUERY_KEY,
|
|
27518
27689
|
EVENT_PACKAGES_QUERY_KEY,
|
|
27519
27690
|
EVENT_PACKAGE_PASSES_QUERY_KEY,
|
|
@@ -27776,6 +27947,8 @@ export {
|
|
|
27776
27947
|
GetEventFaqSectionTranslation,
|
|
27777
27948
|
GetEventFaqSectionTranslations,
|
|
27778
27949
|
GetEventFaqSections,
|
|
27950
|
+
GetEventGalleryImage,
|
|
27951
|
+
GetEventGalleryImages,
|
|
27779
27952
|
GetEventOnSite,
|
|
27780
27953
|
GetEventPackage,
|
|
27781
27954
|
GetEventPackagePass,
|
|
@@ -28259,6 +28432,8 @@ export {
|
|
|
28259
28432
|
SET_EVENT_FAQ_SECTION_QUESTION_TRANSLATION_QUERY_DATA,
|
|
28260
28433
|
SET_EVENT_FAQ_SECTION_TRANSLATIONS_QUERY_DATA,
|
|
28261
28434
|
SET_EVENT_FAQ_SECTION_TRANSLATION_QUERY_DATA,
|
|
28435
|
+
SET_EVENT_GALLERY_IMAGES_QUERY_DATA,
|
|
28436
|
+
SET_EVENT_GALLERY_IMAGE_QUERY_DATA,
|
|
28262
28437
|
SET_EVENT_ON_SITE_QUERY_DATA,
|
|
28263
28438
|
SET_EVENT_PACKAGES_QUERY_DATA,
|
|
28264
28439
|
SET_EVENT_PACKAGE_PASSES_QUERY_DATA,
|
|
@@ -28559,6 +28734,7 @@ export {
|
|
|
28559
28734
|
UpdateEventFaqSectionQuestion,
|
|
28560
28735
|
UpdateEventFaqSectionQuestionTranslation,
|
|
28561
28736
|
UpdateEventFaqSectionTranslation,
|
|
28737
|
+
UpdateEventGalleryImage,
|
|
28562
28738
|
UpdateEventPackage,
|
|
28563
28739
|
UpdateEventPackagePass,
|
|
28564
28740
|
UpdateEventPackageTranslation,
|
|
@@ -28743,6 +28919,7 @@ export {
|
|
|
28743
28919
|
useCreateEventFaqSectionQuestion,
|
|
28744
28920
|
useCreateEventFaqSectionQuestionTranslation,
|
|
28745
28921
|
useCreateEventFaqSectionTranslation,
|
|
28922
|
+
useCreateEventGalleryImage,
|
|
28746
28923
|
useCreateEventPackage,
|
|
28747
28924
|
useCreateEventPackagePass,
|
|
28748
28925
|
useCreateEventPackageTranslation,
|
|
@@ -28840,6 +29017,7 @@ export {
|
|
|
28840
29017
|
useDeleteEventFaqSectionQuestion,
|
|
28841
29018
|
useDeleteEventFaqSectionQuestionTranslation,
|
|
28842
29019
|
useDeleteEventFaqSectionTranslation,
|
|
29020
|
+
useDeleteEventGalleryImage,
|
|
28843
29021
|
useDeleteEventPackage,
|
|
28844
29022
|
useDeleteEventPackagePass,
|
|
28845
29023
|
useDeleteEventPackageTranslation,
|
|
@@ -29040,6 +29218,8 @@ export {
|
|
|
29040
29218
|
useGetEventFaqSectionTranslation,
|
|
29041
29219
|
useGetEventFaqSectionTranslations,
|
|
29042
29220
|
useGetEventFaqSections,
|
|
29221
|
+
useGetEventGalleryImage,
|
|
29222
|
+
useGetEventGalleryImages,
|
|
29043
29223
|
useGetEventOnSite,
|
|
29044
29224
|
useGetEventPackage,
|
|
29045
29225
|
useGetEventPackagePass,
|
|
@@ -29359,6 +29539,7 @@ export {
|
|
|
29359
29539
|
useUpdateEventFaqSectionQuestion,
|
|
29360
29540
|
useUpdateEventFaqSectionQuestionTranslation,
|
|
29361
29541
|
useUpdateEventFaqSectionTranslation,
|
|
29542
|
+
useUpdateEventGalleryImage,
|
|
29362
29543
|
useUpdateEventPackage,
|
|
29363
29544
|
useUpdateEventPackagePass,
|
|
29364
29545
|
useUpdateEventPackageTranslation,
|