@hubs101/js-api-skd-client 1.0.10583 → 1.0.10586
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/lib/api/event/index.d.ts +7 -1
- package/lib/api/event/index.js +37 -1
- package/lib/api/event/types.d.ts +91 -15
- package/lib/api/event/types.js +4 -51
- package/lib/index.js +36 -0
- package/lib/types/base.d.ts +13 -1
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GenericResponseServerType, PublicAdResponse, ResponsePaginationType, ResponseServerType } from "../public/types";
|
|
2
2
|
import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../types";
|
|
3
|
-
import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams, CreateOfferInput, OfferServerResponse } from "./types";
|
|
3
|
+
import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, KeyTopicInput, KeyTopicResponse, OptionServerResponse, Portfolio, PortfolioInput, StatisticInput, StatisticResponse, Stream, StreamInput, TestimonialInput, TestimonialResponse, TicketServerResponse, UserRegistrationsEvent, ZoomParams, CreateOfferInput, OfferServerResponse } from "./types";
|
|
4
4
|
import { APIResponse } from "../../types/base";
|
|
5
5
|
import { Attendee } from "../attendee/types";
|
|
6
6
|
import { Page } from "../pages/types";
|
|
@@ -151,6 +151,12 @@ export declare const _addMediaFolder: (basePath: string, token: string, accountI
|
|
|
151
151
|
export declare const _updateEventWebsite: (basePath: string, token: string, eventId: string, keyData: string, data: {
|
|
152
152
|
website_content: Record<string, string | boolean | File>[];
|
|
153
153
|
}, files?: any) => Promise<EventServerResponse>;
|
|
154
|
+
export declare const _createTestimonial: (basePath: string, token: string, eventId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
155
|
+
export declare const _updateTestimonial: (basePath: string, token: string, eventId: string, testimonialId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
156
|
+
export declare const _createStatistic: (basePath: string, token: string, eventId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
157
|
+
export declare const _updateStatistic: (basePath: string, token: string, eventId: string, statisticId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
158
|
+
export declare const _createKeyTopic: (basePath: string, token: string, eventId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
159
|
+
export declare const _updateKeyTopic: (basePath: string, token: string, eventId: string, keyTopicId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
154
160
|
export declare const _importTickets: (basePath: string, token: string, eventId: string, ticketsList: string[]) => Promise<ResponsePaginationType<TicketServerResponse>>;
|
|
155
161
|
export declare const _fetchPublicEventAdvertisement: (basePath: string, eventId: string) => Promise<GenericResponseServerType<PublicAdResponse[]>>;
|
|
156
162
|
export declare const _activateDataManagers: (basePath: string, token: string, eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports._resendTicketEmail = exports._fetchEventAttendeeActions = exports._fetchPublicEventGroups = exports._fetchEventGroups = exports._unpinExhibition = exports._pinExhibition = exports._unpinDocument = exports._pinDocument = exports._reportExhibitionAction = exports._deleteDocument = exports._updateDocument = exports._createExhibitionDocument = exports._createDocument = exports._assignDocumentToEvent = exports._fetchEventDocuments = exports._fetchUserRegistrationsEvents = exports._fetchEventStreams = exports._fetchEventLocations = exports._deleteLocation = exports._updateLocation = exports._createLocation = exports._fetchExhibitionDetails = exports._deleteDiscount = exports._updateDiscount = exports._createDiscount = exports._fetchEventDiscounts = exports._deleteTicket = exports._updateTicket = exports._createTicket = exports._deleteOption = exports._updateOption = exports._createOption = exports._deleteGroup = exports._deleteSpeakerRole = exports._updateSpeakerRole = exports._updateGroup = exports._createGroup = exports._importAgenda = exports._fetchAttendeesAvailabilities = exports._updateEventTemplates = exports._fetchEventTemplates = exports._fetchEventNotifications = exports._sendSingleNotification = exports._sendNotification = exports._fetchEventDetails = exports._fetchExhibitions = exports._fetchEventsForAccount = exports._fetchTickets = exports._fetchAccounts = exports._fetchEventRegistrations = void 0;
|
|
13
13
|
exports._assignPortfolio = exports._deletePortfolio = exports._fetchPortfolios = exports._sendOffer = exports._updateOffer = exports._fetchOfferDetails = exports._fetchOffers = exports._createOffer = exports._deleteExhibition = exports._updateExhibition = exports._importExhibition = exports._createExhibition = exports._fetchMyExhibitions = exports._fetchAllExhibitions = exports._deleteStream = exports._updateStream = exports._createStream = exports._fetchYoutubeContent = exports._fetchZoomContent = exports._createEvent = exports._unassignPaymentAccount = exports._assignPaymentAccount = exports._fetchEventOptions = exports._fetchEventTickets = exports._updateEvent = exports._deletePage = exports._updatePage = exports._createPage = exports._fetchEventPages = exports._updateAccountWithFiles = exports._fetchMySessions = exports._fetchEditableEvents = exports._fetchSpeakerById = exports._fetchSpeakers = exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = exports._fetchEventOrderedTickets = exports._confirmBooking = exports._fetchEventBookings = exports._acceptInternTicket = exports._acceptTicket = exports._postTicketDetails = exports._fetchTicketDetails = exports._assignTicket = exports._fetchAccountBookings = exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = void 0;
|
|
14
|
-
exports._fetchAccountDocuments = exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importTickets = exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadFileToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = exports._fetchBlogPages = exports._fetchPortfolioEvents = exports._fetchPortfolioDetails = exports._updatePortfolio = exports._createPortfolio = exports._unassignPortfolio = void 0;
|
|
14
|
+
exports._fetchAccountDocuments = exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importTickets = exports._updateKeyTopic = exports._createKeyTopic = exports._updateStatistic = exports._createStatistic = exports._updateTestimonial = exports._createTestimonial = exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadFileToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = exports._fetchBlogPages = exports._fetchPortfolioEvents = exports._fetchPortfolioDetails = exports._updatePortfolio = exports._createPortfolio = exports._unassignPortfolio = void 0;
|
|
15
15
|
const api_1 = require("../../utils/api");
|
|
16
16
|
const base_1 = require("../../utils/base");
|
|
17
17
|
const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -763,6 +763,42 @@ const _updateEventWebsite = (basePath, token, eventId, keyData, data, files) =>
|
|
|
763
763
|
return response === null || response === void 0 ? void 0 : response.data;
|
|
764
764
|
});
|
|
765
765
|
exports._updateEventWebsite = _updateEventWebsite;
|
|
766
|
+
const _createTestimonial = (basePath, token, eventId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
767
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
768
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/testimonials`, data, files !== null && files !== void 0 ? files : [], token);
|
|
769
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
770
|
+
});
|
|
771
|
+
exports._createTestimonial = _createTestimonial;
|
|
772
|
+
const _updateTestimonial = (basePath, token, eventId, testimonialId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
773
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
774
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/testimonials/${testimonialId}`, data, files !== null && files !== void 0 ? files : [], token, "put");
|
|
775
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
776
|
+
});
|
|
777
|
+
exports._updateTestimonial = _updateTestimonial;
|
|
778
|
+
const _createStatistic = (basePath, token, eventId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
779
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
780
|
+
const response = yield (0, api_1.postRequestWE)(`${base.EVENTS}/${eventId}/statistics`, data, token);
|
|
781
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
782
|
+
});
|
|
783
|
+
exports._createStatistic = _createStatistic;
|
|
784
|
+
const _updateStatistic = (basePath, token, eventId, statisticId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
785
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
786
|
+
const response = yield (0, api_1.putRequest)(`${base.EVENTS}/${eventId}/statistics/${statisticId}`, token, data);
|
|
787
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
788
|
+
});
|
|
789
|
+
exports._updateStatistic = _updateStatistic;
|
|
790
|
+
const _createKeyTopic = (basePath, token, eventId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
791
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
792
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/keytopics`, data, files !== null && files !== void 0 ? files : [], token);
|
|
793
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
794
|
+
});
|
|
795
|
+
exports._createKeyTopic = _createKeyTopic;
|
|
796
|
+
const _updateKeyTopic = (basePath, token, eventId, keyTopicId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
797
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
798
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/keytopics/${keyTopicId}`, data, files !== null && files !== void 0 ? files : [], token, "put");
|
|
799
|
+
return response === null || response === void 0 ? void 0 : response.data;
|
|
800
|
+
});
|
|
801
|
+
exports._updateKeyTopic = _updateKeyTopic;
|
|
766
802
|
const _importTickets = (basePath, token, eventId, ticketsList) => __awaiter(void 0, void 0, void 0, function* () {
|
|
767
803
|
const base = (0, base_1.getBasePath)(basePath);
|
|
768
804
|
const ticketListString = ticketsList.join(",");
|
package/lib/api/event/types.d.ts
CHANGED
|
@@ -162,12 +162,6 @@ export type MenuItemType = {
|
|
|
162
162
|
internalUrl: boolean;
|
|
163
163
|
contentTemplate: string;
|
|
164
164
|
childItems?: string[];
|
|
165
|
-
isDesktopDisabled?: boolean;
|
|
166
|
-
isMobileDisabled?: boolean;
|
|
167
|
-
isTabletDisabled?: boolean;
|
|
168
|
-
to?: string;
|
|
169
|
-
subject?: string;
|
|
170
|
-
body?: string;
|
|
171
165
|
};
|
|
172
166
|
export type Design = {
|
|
173
167
|
backgroundColor: string;
|
|
@@ -502,12 +496,10 @@ export declare const MENU_ITEM_TYPES: {
|
|
|
502
496
|
readonly INTERNAL: "internal";
|
|
503
497
|
readonly EXTERNAL: "external";
|
|
504
498
|
readonly MAILING: "mailto";
|
|
499
|
+
readonly DOWNLOAD: "download";
|
|
500
|
+
readonly APPLY_AS_SPEAKER: "apply-as-speaker";
|
|
501
|
+
readonly BECOME_PARTNER: "become-partner";
|
|
505
502
|
};
|
|
506
|
-
export declare const MENU_ITEM_STYLING: {
|
|
507
|
-
readonly LINK: "link";
|
|
508
|
-
readonly BUTTON: "button";
|
|
509
|
-
};
|
|
510
|
-
export declare const MENU_ITEM_STYLING_TYPE: readonly ["link", "button"];
|
|
511
503
|
export declare const MENU_ELEMENT_TYPES: {
|
|
512
504
|
readonly ITEM: "item";
|
|
513
505
|
readonly BUTTON: "button";
|
|
@@ -522,13 +514,34 @@ export declare const DEFAULT_MENU_TYPES: {
|
|
|
522
514
|
readonly EVENT_INFO: "event-info";
|
|
523
515
|
readonly CONTENT_HUB: "content-hub";
|
|
524
516
|
};
|
|
525
|
-
export declare const DEFAULT_MENU_ITEM: readonly [
|
|
526
|
-
|
|
517
|
+
export declare const DEFAULT_MENU_ITEM: readonly [
|
|
518
|
+
"home",
|
|
519
|
+
"agenda",
|
|
520
|
+
"speaker",
|
|
521
|
+
"partner",
|
|
522
|
+
"who-&-why",
|
|
523
|
+
"event-info",
|
|
524
|
+
"content-hub"
|
|
525
|
+
];
|
|
526
|
+
export declare const MENU_ITEM_TYPE: readonly [
|
|
527
|
+
"home",
|
|
528
|
+
"agenda",
|
|
529
|
+
"speaker",
|
|
530
|
+
"partner",
|
|
531
|
+
"who-&-why",
|
|
532
|
+
"event-info",
|
|
533
|
+
"content-hub",
|
|
534
|
+
"internal",
|
|
535
|
+
"external",
|
|
536
|
+
"mailto"
|
|
537
|
+
];
|
|
538
|
+
export declare const MENU_ITEM_STYLING_LINK = 0;
|
|
539
|
+
export declare const MENU_ITEM_STYLING_BUTTON = 1;
|
|
527
540
|
export type MenuItem = {
|
|
528
541
|
label: string;
|
|
529
542
|
level: 0 | 1;
|
|
530
543
|
icon: string;
|
|
531
|
-
styling:
|
|
544
|
+
styling: typeof MENU_ITEM_STYLING_LINK | typeof MENU_ITEM_STYLING_BUTTON;
|
|
532
545
|
type: (typeof MENU_ITEM_TYPE)[number];
|
|
533
546
|
url: string;
|
|
534
547
|
order: number;
|
|
@@ -539,7 +552,6 @@ export type MenuItem = {
|
|
|
539
552
|
to?: string;
|
|
540
553
|
subject?: string;
|
|
541
554
|
body?: string;
|
|
542
|
-
element?: (typeof MENU_ELEMENT_TYPE)[number];
|
|
543
555
|
};
|
|
544
556
|
export type EventServerResponse = {
|
|
545
557
|
id: string;
|
|
@@ -1110,4 +1122,68 @@ export type OfferServerResponse = {
|
|
|
1110
1122
|
offer_sent_at: string;
|
|
1111
1123
|
event: string;
|
|
1112
1124
|
};
|
|
1125
|
+
export type TestimonialInput = {
|
|
1126
|
+
name?: string;
|
|
1127
|
+
position?: string;
|
|
1128
|
+
company?: string;
|
|
1129
|
+
content?: string;
|
|
1130
|
+
image?: File | string;
|
|
1131
|
+
rating?: number;
|
|
1132
|
+
published?: boolean;
|
|
1133
|
+
order?: number;
|
|
1134
|
+
};
|
|
1135
|
+
export type TestimonialResponse = {
|
|
1136
|
+
id: string;
|
|
1137
|
+
name: string;
|
|
1138
|
+
position: string;
|
|
1139
|
+
company: string;
|
|
1140
|
+
content: string;
|
|
1141
|
+
image: string;
|
|
1142
|
+
rating: number;
|
|
1143
|
+
published: boolean;
|
|
1144
|
+
order: number;
|
|
1145
|
+
event: string;
|
|
1146
|
+
created_at: string;
|
|
1147
|
+
updated_at: string;
|
|
1148
|
+
};
|
|
1149
|
+
export type StatisticInput = {
|
|
1150
|
+
label?: string;
|
|
1151
|
+
value?: string | number;
|
|
1152
|
+
icon?: string;
|
|
1153
|
+
description?: string;
|
|
1154
|
+
published?: boolean;
|
|
1155
|
+
order?: number;
|
|
1156
|
+
};
|
|
1157
|
+
export type StatisticResponse = {
|
|
1158
|
+
id: string;
|
|
1159
|
+
label: string;
|
|
1160
|
+
value: string | number;
|
|
1161
|
+
icon: string;
|
|
1162
|
+
description: string;
|
|
1163
|
+
published: boolean;
|
|
1164
|
+
order: number;
|
|
1165
|
+
event: string;
|
|
1166
|
+
created_at: string;
|
|
1167
|
+
updated_at: string;
|
|
1168
|
+
};
|
|
1169
|
+
export type KeyTopicInput = {
|
|
1170
|
+
title?: string;
|
|
1171
|
+
description?: string;
|
|
1172
|
+
icon?: string;
|
|
1173
|
+
image?: File | string;
|
|
1174
|
+
published?: boolean;
|
|
1175
|
+
order?: number;
|
|
1176
|
+
};
|
|
1177
|
+
export type KeyTopicResponse = {
|
|
1178
|
+
id: string;
|
|
1179
|
+
title: string;
|
|
1180
|
+
description: string;
|
|
1181
|
+
icon: string;
|
|
1182
|
+
image: string;
|
|
1183
|
+
published: boolean;
|
|
1184
|
+
order: number;
|
|
1185
|
+
event: string;
|
|
1186
|
+
created_at: string;
|
|
1187
|
+
updated_at: string;
|
|
1188
|
+
};
|
|
1113
1189
|
export {};
|
package/lib/api/event/types.js
CHANGED
|
@@ -1,59 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.MENU_ITEM_STYLING_BUTTON = exports.MENU_ITEM_STYLING_LINK = exports.GROUP_STYLE = void 0;
|
|
4
4
|
exports.GROUP_STYLE = [
|
|
5
5
|
{ "": "" }, // unassigned, top of the list
|
|
6
6
|
{ "1": "default" }, // BP
|
|
7
7
|
{ "2": "highlighted" }, // PP
|
|
8
8
|
{ "3": "big" }, // LP
|
|
9
9
|
];
|
|
10
|
-
//
|
|
11
|
-
exports.
|
|
12
|
-
|
|
13
|
-
EXTERNAL: "external",
|
|
14
|
-
MAILING: "mailto",
|
|
15
|
-
};
|
|
16
|
-
// Keep existing MENU_ITEM_STYLING as is
|
|
17
|
-
exports.MENU_ITEM_STYLING = {
|
|
18
|
-
LINK: "link",
|
|
19
|
-
BUTTON: "button",
|
|
20
|
-
};
|
|
21
|
-
exports.MENU_ITEM_STYLING_TYPE = ["link", "button"];
|
|
22
|
-
// Add MENU_ELEMENT_TYPES (new constant)
|
|
23
|
-
exports.MENU_ELEMENT_TYPES = {
|
|
24
|
-
ITEM: "item",
|
|
25
|
-
BUTTON: "button",
|
|
26
|
-
};
|
|
27
|
-
exports.MENU_ELEMENT_TYPE = ["item", "button"];
|
|
28
|
-
// Keep existing DEFAULT_MENU_TYPES as is
|
|
29
|
-
exports.DEFAULT_MENU_TYPES = {
|
|
30
|
-
HOME: "home",
|
|
31
|
-
AGENDA: "agenda",
|
|
32
|
-
SPEAKER: "speaker",
|
|
33
|
-
PARTNER: "partner",
|
|
34
|
-
WHO_WHY: "who-&-why",
|
|
35
|
-
EVENT_INFO: "event-info",
|
|
36
|
-
CONTENT_HUB: "content-hub",
|
|
37
|
-
};
|
|
38
|
-
exports.DEFAULT_MENU_ITEM = [
|
|
39
|
-
"home",
|
|
40
|
-
"agenda",
|
|
41
|
-
"speaker",
|
|
42
|
-
"partner",
|
|
43
|
-
"who-&-why",
|
|
44
|
-
"event-info",
|
|
45
|
-
"content-hub",
|
|
46
|
-
];
|
|
47
|
-
// Update MENU_ITEM_TYPE to include "mailto"
|
|
48
|
-
exports.MENU_ITEM_TYPE = [
|
|
49
|
-
"home",
|
|
50
|
-
"agenda",
|
|
51
|
-
"speaker",
|
|
52
|
-
"partner",
|
|
53
|
-
"who-&-why",
|
|
54
|
-
"event-info",
|
|
55
|
-
"content-hub",
|
|
56
|
-
"internal",
|
|
57
|
-
"external",
|
|
58
|
-
"mailto",
|
|
59
|
-
];
|
|
10
|
+
// Define constants for styling: 0 for link, 1 for button
|
|
11
|
+
exports.MENU_ITEM_STYLING_LINK = 0;
|
|
12
|
+
exports.MENU_ITEM_STYLING_BUTTON = 1;
|
package/lib/index.js
CHANGED
|
@@ -220,6 +220,30 @@ function EventAPIProvider(props) {
|
|
|
220
220
|
(0, api_1.validateConfig)(config);
|
|
221
221
|
return (0, event_1._sendOffer)(config.baseUrl, config.token, accountId, offerId);
|
|
222
222
|
}), [config, config.baseUrl, config.token]);
|
|
223
|
+
const createTestimonial = (0, react_1.useCallback)((eventId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
224
|
+
(0, api_1.validateConfig)(config);
|
|
225
|
+
return (0, event_1._createTestimonial)(config.baseUrl, config.token, eventId, data, files);
|
|
226
|
+
}), [config, config.baseUrl, config.token]);
|
|
227
|
+
const updateTestimonial = (0, react_1.useCallback)((eventId, testimonialId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
228
|
+
(0, api_1.validateConfig)(config);
|
|
229
|
+
return (0, event_1._updateTestimonial)(config.baseUrl, config.token, eventId, testimonialId, data, files);
|
|
230
|
+
}), [config, config.baseUrl, config.token]);
|
|
231
|
+
const createStatistic = (0, react_1.useCallback)((eventId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
232
|
+
(0, api_1.validateConfig)(config);
|
|
233
|
+
return (0, event_1._createStatistic)(config.baseUrl, config.token, eventId, data);
|
|
234
|
+
}), [config, config.baseUrl, config.token]);
|
|
235
|
+
const updateStatistic = (0, react_1.useCallback)((eventId, statisticId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
236
|
+
(0, api_1.validateConfig)(config);
|
|
237
|
+
return (0, event_1._updateStatistic)(config.baseUrl, config.token, eventId, statisticId, data);
|
|
238
|
+
}), [config, config.baseUrl, config.token]);
|
|
239
|
+
const createKeyTopic = (0, react_1.useCallback)((eventId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
240
|
+
(0, api_1.validateConfig)(config);
|
|
241
|
+
return (0, event_1._createKeyTopic)(config.baseUrl, config.token, eventId, data, files);
|
|
242
|
+
}), [config, config.baseUrl, config.token]);
|
|
243
|
+
const updateKeyTopic = (0, react_1.useCallback)((eventId, keyTopicId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
244
|
+
(0, api_1.validateConfig)(config);
|
|
245
|
+
return (0, event_1._updateKeyTopic)(config.baseUrl, config.token, eventId, keyTopicId, data, files);
|
|
246
|
+
}), [config, config.baseUrl, config.token]);
|
|
223
247
|
const resendTicketEmail = react_1.default.useCallback((ticketId) => __awaiter(this, void 0, void 0, function* () {
|
|
224
248
|
(0, api_1.validateConfig)(config);
|
|
225
249
|
return (0, event_1._resendTicketEmail)(config.baseUrl, config.token, ticketId);
|
|
@@ -1384,6 +1408,12 @@ function EventAPIProvider(props) {
|
|
|
1384
1408
|
fetchOfferDetails,
|
|
1385
1409
|
updateOffer,
|
|
1386
1410
|
sendOffer,
|
|
1411
|
+
createTestimonial,
|
|
1412
|
+
updateTestimonial,
|
|
1413
|
+
createStatistic,
|
|
1414
|
+
updateStatistic,
|
|
1415
|
+
createKeyTopic,
|
|
1416
|
+
updateKeyTopic,
|
|
1387
1417
|
addPostNative,
|
|
1388
1418
|
editMeetingNative,
|
|
1389
1419
|
} }, props.children));
|
|
@@ -1648,6 +1678,12 @@ exports.BaseAPI = {
|
|
|
1648
1678
|
fetchOfferDetails: event_1._fetchOfferDetails,
|
|
1649
1679
|
updateOffer: event_1._updateOffer,
|
|
1650
1680
|
sendOffer: event_1._sendOffer,
|
|
1681
|
+
createTestimonial: event_1._createTestimonial,
|
|
1682
|
+
updateTestimonial: event_1._updateTestimonial,
|
|
1683
|
+
createStatistic: event_1._createStatistic,
|
|
1684
|
+
updateStatistic: event_1._updateStatistic,
|
|
1685
|
+
createKeyTopic: event_1._createKeyTopic,
|
|
1686
|
+
updateKeyTopic: event_1._updateKeyTopic,
|
|
1651
1687
|
addPostNative: posts_1._addPostNative,
|
|
1652
1688
|
};
|
|
1653
1689
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
|
|
2
2
|
import { ColocatedEventDetailsResponse, ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PackageType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType, SessionType, FeedType, FeedInputType, FeedDetailsType } from "../api/authentication/types";
|
|
3
3
|
import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
|
|
4
|
-
import { Account, AccountDetails, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, CreateOfferInput, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, GroupType, OfferServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
4
|
+
import { Account, AccountDetails, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, CreateOfferInput, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, GroupType, KeyTopicInput, KeyTopicResponse, OfferServerResponse, OptionServerResponse, Portfolio, PortfolioInput, StatisticInput, StatisticResponse, Stream, StreamInput, TestimonialInput, TestimonialResponse, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
5
5
|
import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
|
|
6
6
|
import { CommentBody, Post, PostBody, UpdatePostBody } from "../api/posts/types";
|
|
7
7
|
import { GenericResponseServerType, PublicAdResponse, PublicEventItem, ResponsePaginationType, ResponseServerType } from "../api/public/types";
|
|
@@ -369,6 +369,12 @@ export type BaseAPIType = {
|
|
|
369
369
|
createFeed: (basePath: string, token: string, accountId: string, data: FeedInputType, files: any[]) => Promise<FeedType>;
|
|
370
370
|
updateFeed: (basePath: string, token: string, accountId: string, feedId: string, data: FeedInputType, files: any[]) => Promise<FeedType>;
|
|
371
371
|
deleteFeed: (basePath: string, token: string, accountId: string, feedId: string) => Promise<any>;
|
|
372
|
+
createTestimonial: (basePath: string, token: string, eventId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
373
|
+
updateTestimonial: (basePath: string, token: string, eventId: string, testimonialId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
374
|
+
createStatistic: (basePath: string, token: string, eventId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
375
|
+
updateStatistic: (basePath: string, token: string, eventId: string, statisticId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
376
|
+
createKeyTopic: (basePath: string, token: string, eventId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
377
|
+
updateKeyTopic: (basePath: string, token: string, eventId: string, keyTopicId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
372
378
|
};
|
|
373
379
|
export type EventAPIType = {
|
|
374
380
|
config: BaseAPIConfigType;
|
|
@@ -663,6 +669,12 @@ export type EventAPIType = {
|
|
|
663
669
|
message: string;
|
|
664
670
|
}>;
|
|
665
671
|
editMeetingNative: (body: MeetingItem) => Promise<MeetingItem>;
|
|
672
|
+
createTestimonial: (eventId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
673
|
+
updateTestimonial: (eventId: string, testimonialId: string, data: TestimonialInput, files?: any) => Promise<TestimonialResponse>;
|
|
674
|
+
createStatistic: (eventId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
675
|
+
updateStatistic: (eventId: string, statisticId: string, data: StatisticInput) => Promise<StatisticResponse>;
|
|
676
|
+
createKeyTopic: (eventId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
677
|
+
updateKeyTopic: (eventId: string, keyTopicId: string, data: KeyTopicInput, files?: any) => Promise<KeyTopicResponse>;
|
|
666
678
|
};
|
|
667
679
|
export type BaseAPIConfigType = {
|
|
668
680
|
baseUrl?: string;
|