@hubs101/js-api-skd-client 1.0.10652 → 1.0.10655
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 +15 -1
- package/lib/api/event/index.js +51 -3
- package/lib/api/event/types.d.ts +89 -0
- package/lib/index.js +49 -0
- package/lib/types/base.d.ts +30 -1
- package/lib/utils/base.js +1 -0
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
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, FaqInput, FileDetails, GroupServerResponse, KeyTopicInput, KeyTopicResponse, OptionServerResponse, Portfolio, PortfolioInput, StatisticInput, StatisticResponse, Stream, StreamInput, TestimonialInput, TestimonialResponse, TicketServerResponse, UserRegistrationsEvent, ZoomParams, CreateOfferInput, OfferServerResponse, SpeakerAdvertInput, ExhibitionBulkUpdateInput, SessionBulkUpdateInput, OnsiteInput } from "./types";
|
|
3
|
+
import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FaqInput, FileDetails, GroupServerResponse, KeyTopicInput, KeyTopicResponse, OptionServerResponse, Portfolio, PortfolioInput, Blog, BlogInput, StatisticInput, StatisticResponse, Stream, StreamInput, TestimonialInput, TestimonialResponse, TicketServerResponse, UserRegistrationsEvent, ZoomParams, CreateOfferInput, OfferServerResponse, SpeakerAdvertInput, ExhibitionBulkUpdateInput, SessionBulkUpdateInput, OnsiteInput, EventSpeaker } from "./types";
|
|
4
4
|
import { APIResponse } from "../../types/base";
|
|
5
5
|
import { Attendee } from "../attendee/types";
|
|
6
6
|
import type { AttendeeProfile } from "../attendee/types";
|
|
7
7
|
import { Page } from "../pages/types";
|
|
8
|
+
export declare const _fetchEventSpeakers: (basePath: string, token: string, eventId: string) => Promise<EventSpeaker[]>;
|
|
8
9
|
export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
9
10
|
export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
|
|
10
11
|
export declare const _fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
@@ -132,6 +133,19 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
|
|
|
132
133
|
value: File;
|
|
133
134
|
}[]) => Promise<any>;
|
|
134
135
|
export declare const _fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
|
136
|
+
export declare const _fetchBlogs: (basePath: string, token: string, accountId: string) => Promise<Blog[]>;
|
|
137
|
+
export declare const _deleteBlog: (basePath: string, token: string, blogId: string) => Promise<any>;
|
|
138
|
+
export declare const _assignBlog: (basePath: string, token: string, eventId: string, blogId: string) => Promise<any>;
|
|
139
|
+
export declare const _unassignBlog: (basePath: string, token: string, eventId: string, blogId: string) => Promise<any>;
|
|
140
|
+
export declare const _createBlog: (basePath: string, token: string, data: BlogInput, files: {
|
|
141
|
+
name: string;
|
|
142
|
+
value: File;
|
|
143
|
+
}[]) => Promise<any>;
|
|
144
|
+
export declare const _updateBlog: (basePath: string, token: string, blogId: string, data: BlogInput, files: {
|
|
145
|
+
name: string;
|
|
146
|
+
value: File;
|
|
147
|
+
}[]) => Promise<any>;
|
|
148
|
+
export declare const _fetchBlogDetails: (basePath: string, token: string, blogId: string) => Promise<Blog>;
|
|
135
149
|
export declare const _fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
|
|
136
150
|
export declare const _fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
|
|
137
151
|
export declare const _createBlogPage: (basePath: string, token: string, portfolioId: string, data: BlogPageInput, files: {
|
package/lib/api/event/index.js
CHANGED
|
@@ -9,11 +9,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports._updateEventSessions = exports._updateEventOnsite = exports._updateEventExhibitions = exports._updateEventSpeakerAdverts = exports._updateEventFaqs = exports._updateEventTickets = exports._updateEventSurveys = exports._updateEventCitations = exports._updateEventTargetGroups = exports._fetchAccountProfiles = exports._fetchAccountDocuments = exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importEventWebsiteContent = 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 = exports._assignPortfolio = exports._deletePortfolio = void 0;
|
|
12
|
+
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 = exports._fetchEventSpeakers = void 0;
|
|
13
|
+
exports._approveOffer = exports._sendOffer = exports._updateOffer = exports._fetchOfferDetails = exports._fetchOffers = exports._createOffer = exports._importOnboardingQuestions = 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 = exports._resendTicketEmail = void 0;
|
|
14
|
+
exports._updateEventSessions = exports._updateEventOnsite = exports._updateEventExhibitions = exports._updateEventSpeakerAdverts = exports._updateEventFaqs = exports._updateEventTickets = exports._updateEventSurveys = exports._updateEventCitations = exports._updateEventTargetGroups = exports._fetchAccountProfiles = exports._fetchAccountDocuments = exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importEventWebsiteContent = 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._fetchBlogDetails = exports._updateBlog = exports._createBlog = exports._unassignBlog = exports._assignBlog = exports._deleteBlog = exports._fetchBlogs = exports._fetchPortfolioDetails = exports._updatePortfolio = exports._createPortfolio = exports._unassignPortfolio = exports._assignPortfolio = exports._deletePortfolio = exports._fetchPortfolios = void 0;
|
|
15
15
|
const api_1 = require("../../utils/api");
|
|
16
16
|
const base_1 = require("../../utils/base");
|
|
17
|
+
const _fetchEventSpeakers = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
19
|
+
const { data: eventSpeakers } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/speakers`, token);
|
|
20
|
+
return eventSpeakers;
|
|
21
|
+
});
|
|
22
|
+
exports._fetchEventSpeakers = _fetchEventSpeakers;
|
|
17
23
|
const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
18
24
|
const base = (0, base_1.getBasePath)(basePath);
|
|
19
25
|
const { data: eventRegistrations } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/registrations`, token);
|
|
@@ -679,6 +685,48 @@ const _fetchPortfolioDetails = (basePath, token, portfolioId) => __awaiter(void
|
|
|
679
685
|
return portfolioDetails;
|
|
680
686
|
});
|
|
681
687
|
exports._fetchPortfolioDetails = _fetchPortfolioDetails;
|
|
688
|
+
const _fetchBlogs = (basePath, token, accountId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
689
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
690
|
+
const { data: accountBlogs } = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/blogs`, token);
|
|
691
|
+
return accountBlogs;
|
|
692
|
+
});
|
|
693
|
+
exports._fetchBlogs = _fetchBlogs;
|
|
694
|
+
const _deleteBlog = (basePath, token, blogId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
695
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
696
|
+
const response = yield (0, api_1.deleteRequestWE)(`${base.BLOGS}/${blogId}`, token);
|
|
697
|
+
return response;
|
|
698
|
+
});
|
|
699
|
+
exports._deleteBlog = _deleteBlog;
|
|
700
|
+
const _assignBlog = (basePath, token, eventId, blogId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
701
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
702
|
+
const response = yield (0, api_1.postRequestWE)(`${base.EVENTS}/${eventId}/blog`, { blog: blogId }, token);
|
|
703
|
+
return response;
|
|
704
|
+
});
|
|
705
|
+
exports._assignBlog = _assignBlog;
|
|
706
|
+
const _unassignBlog = (basePath, token, eventId, blogId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
707
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
708
|
+
const response = yield (0, api_1.deleteRequestWE)(`${base.EVENTS}/${eventId}/blog/${blogId}`, token);
|
|
709
|
+
return response;
|
|
710
|
+
});
|
|
711
|
+
exports._unassignBlog = _unassignBlog;
|
|
712
|
+
const _createBlog = (basePath, token, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
713
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
714
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BLOGS}`, data, files, token);
|
|
715
|
+
return response;
|
|
716
|
+
});
|
|
717
|
+
exports._createBlog = _createBlog;
|
|
718
|
+
const _updateBlog = (basePath, token, blogId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
719
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
720
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BLOGS}/${blogId}`, data, files, token, "put");
|
|
721
|
+
return response;
|
|
722
|
+
});
|
|
723
|
+
exports._updateBlog = _updateBlog;
|
|
724
|
+
const _fetchBlogDetails = (basePath, token, blogId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
725
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
726
|
+
const { data: blogDetails } = yield (0, api_1.getRequest)(`${base.BLOGS}/${blogId}`, token);
|
|
727
|
+
return blogDetails;
|
|
728
|
+
});
|
|
729
|
+
exports._fetchBlogDetails = _fetchBlogDetails;
|
|
682
730
|
const _fetchPortfolioEvents = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
683
731
|
const base = (0, base_1.getBasePath)(basePath);
|
|
684
732
|
const { data: portfolioEvents } = yield (0, api_1.getRequest)(`${base.PORTFOLIOS}/${portfolioId}/events`, token);
|
package/lib/api/event/types.d.ts
CHANGED
|
@@ -382,6 +382,42 @@ export type AnswersType = {
|
|
|
382
382
|
id: string;
|
|
383
383
|
answers: string[];
|
|
384
384
|
};
|
|
385
|
+
export type EventSpeaker = {
|
|
386
|
+
id: string;
|
|
387
|
+
profile: any;
|
|
388
|
+
salutation: string;
|
|
389
|
+
first_name: string;
|
|
390
|
+
last_name: string;
|
|
391
|
+
booking_answers?: any[];
|
|
392
|
+
priority: number;
|
|
393
|
+
onsite: boolean;
|
|
394
|
+
hidden: boolean;
|
|
395
|
+
addition: any;
|
|
396
|
+
source: any;
|
|
397
|
+
welcome_email: string;
|
|
398
|
+
roles: string[];
|
|
399
|
+
invited_at: string;
|
|
400
|
+
invited_by: string;
|
|
401
|
+
approved_at: string;
|
|
402
|
+
confirmed_at: string;
|
|
403
|
+
approved_by: string;
|
|
404
|
+
onboarded_at: string;
|
|
405
|
+
created_at: string;
|
|
406
|
+
first_check_in_at: string;
|
|
407
|
+
last_reminder_at: string;
|
|
408
|
+
last_badge_print_at: string;
|
|
409
|
+
images: any[];
|
|
410
|
+
address: Address;
|
|
411
|
+
contact: Contact;
|
|
412
|
+
public_contact: Contact;
|
|
413
|
+
job: any;
|
|
414
|
+
company: any;
|
|
415
|
+
chat_recipient: string;
|
|
416
|
+
chat_sender: string;
|
|
417
|
+
activitys: string;
|
|
418
|
+
visibility: string;
|
|
419
|
+
assignedSessionsCount: number;
|
|
420
|
+
};
|
|
385
421
|
export type EventRegistration = Attendee & {
|
|
386
422
|
last_badge_print_at?: string;
|
|
387
423
|
first_check_in_at?: string;
|
|
@@ -999,6 +1035,59 @@ export type PortfolioInput = {
|
|
|
999
1035
|
details_groups_speaker: string;
|
|
1000
1036
|
details_groups_blogpost: string;
|
|
1001
1037
|
};
|
|
1038
|
+
export type Blog = {
|
|
1039
|
+
id: string;
|
|
1040
|
+
name: string;
|
|
1041
|
+
slug: string;
|
|
1042
|
+
website: string;
|
|
1043
|
+
description_de: string;
|
|
1044
|
+
description_en: string;
|
|
1045
|
+
tags_de: string[];
|
|
1046
|
+
tags_en: string[];
|
|
1047
|
+
design: PortfolioDesign;
|
|
1048
|
+
belong_to: string;
|
|
1049
|
+
published: number;
|
|
1050
|
+
created_at: string | null;
|
|
1051
|
+
updated_at: string | null;
|
|
1052
|
+
deleted_at: string | null;
|
|
1053
|
+
created_by: string | null;
|
|
1054
|
+
updated_by: string | null;
|
|
1055
|
+
deleted_by: string | null;
|
|
1056
|
+
details: GroupDetails;
|
|
1057
|
+
};
|
|
1058
|
+
export type BlogInput = {
|
|
1059
|
+
name: string;
|
|
1060
|
+
account: string;
|
|
1061
|
+
slug: string;
|
|
1062
|
+
website: string;
|
|
1063
|
+
description_de: string;
|
|
1064
|
+
description_en: string;
|
|
1065
|
+
tags_de: string;
|
|
1066
|
+
tags_en: string;
|
|
1067
|
+
belong_to: string;
|
|
1068
|
+
published: number;
|
|
1069
|
+
created_at: string | null;
|
|
1070
|
+
updated_at: string | null;
|
|
1071
|
+
deleted_at: string | null;
|
|
1072
|
+
created_by: string | null;
|
|
1073
|
+
updated_by: string | null;
|
|
1074
|
+
deleted_by: string | null;
|
|
1075
|
+
design_portfolio_primary_color: string;
|
|
1076
|
+
design_portfolio_secondary_color: string;
|
|
1077
|
+
design_portfolio_background_color: string;
|
|
1078
|
+
design_portfolio_pos?: string;
|
|
1079
|
+
design_portfolio_neg?: string;
|
|
1080
|
+
design_portfolio_desktop_background?: string;
|
|
1081
|
+
design_portfolio_tablet_background?: string;
|
|
1082
|
+
design_portfolio_mobile_background?: string;
|
|
1083
|
+
design_portfolio_background_image_svg?: string;
|
|
1084
|
+
design_portfolio_video_url?: string;
|
|
1085
|
+
design_portfolio_video_image?: string;
|
|
1086
|
+
details_groups_session: string;
|
|
1087
|
+
details_groups_exhibitor: string;
|
|
1088
|
+
details_groups_speaker: string;
|
|
1089
|
+
details_groups_blogpost: string;
|
|
1090
|
+
};
|
|
1002
1091
|
export type BlogPage = {
|
|
1003
1092
|
id: string;
|
|
1004
1093
|
headline: string;
|
package/lib/index.js
CHANGED
|
@@ -88,6 +88,11 @@ function EventAPIProvider(props) {
|
|
|
88
88
|
setConfig({ baseUrl });
|
|
89
89
|
return true;
|
|
90
90
|
}, [config]);
|
|
91
|
+
const fetchEventSpeakers = react_1.default.useCallback((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
(0, api_1.validateConfig)(config);
|
|
93
|
+
const eventSpeakers = yield (0, event_1._fetchEventSpeakers)(config.baseUrl, config.token, eventId);
|
|
94
|
+
return eventSpeakers;
|
|
95
|
+
}), [config, config.baseUrl, config.token]);
|
|
91
96
|
const fetchEventRegistrations = react_1.default.useCallback((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
92
97
|
(0, api_1.validateConfig)(config);
|
|
93
98
|
const eventRegistrations = yield (0, event_1._fetchEventRegistrations)(config.baseUrl, config.token, eventId);
|
|
@@ -1072,6 +1077,34 @@ function EventAPIProvider(props) {
|
|
|
1072
1077
|
(0, api_1.validateConfig)(config);
|
|
1073
1078
|
return (0, event_1._fetchPortfolioDetails)(config.baseUrl, config.token, portfolioId);
|
|
1074
1079
|
}), [config, config.baseUrl, config.token]);
|
|
1080
|
+
const fetchBlogs = react_1.default.useCallback((accountId) => __awaiter(this, void 0, void 0, function* () {
|
|
1081
|
+
(0, api_1.validateConfig)(config);
|
|
1082
|
+
return (0, event_1._fetchBlogs)(config.baseUrl, config.token, accountId);
|
|
1083
|
+
}), [config, config.baseUrl, config.token]);
|
|
1084
|
+
const deleteBlog = react_1.default.useCallback((blogId) => __awaiter(this, void 0, void 0, function* () {
|
|
1085
|
+
(0, api_1.validateConfig)(config);
|
|
1086
|
+
return (0, event_1._deleteBlog)(config.baseUrl, config.token, blogId);
|
|
1087
|
+
}), [config, config.baseUrl, config.token]);
|
|
1088
|
+
const assignBlog = react_1.default.useCallback((eventId, blogId) => __awaiter(this, void 0, void 0, function* () {
|
|
1089
|
+
(0, api_1.validateConfig)(config);
|
|
1090
|
+
return (0, event_1._assignBlog)(config.baseUrl, config.token, eventId, blogId);
|
|
1091
|
+
}), [config, config.baseUrl, config.token]);
|
|
1092
|
+
const unassignBlog = react_1.default.useCallback((eventId, blogId) => __awaiter(this, void 0, void 0, function* () {
|
|
1093
|
+
(0, api_1.validateConfig)(config);
|
|
1094
|
+
return (0, event_1._unassignBlog)(config.baseUrl, config.token, eventId, blogId);
|
|
1095
|
+
}), [config, config.baseUrl, config.token]);
|
|
1096
|
+
const createBlog = react_1.default.useCallback((data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
1097
|
+
(0, api_1.validateConfig)(config);
|
|
1098
|
+
return (0, event_1._createBlog)(config.baseUrl, config.token, data, files);
|
|
1099
|
+
}), [config, config.baseUrl, config.token]);
|
|
1100
|
+
const updateBlog = react_1.default.useCallback((blogId, data, files) => __awaiter(this, void 0, void 0, function* () {
|
|
1101
|
+
(0, api_1.validateConfig)(config);
|
|
1102
|
+
return (0, event_1._updateBlog)(config.baseUrl, config.token, blogId, data, files);
|
|
1103
|
+
}), [config, config.baseUrl, config.token]);
|
|
1104
|
+
const fetchBlogDetails = react_1.default.useCallback((blogId) => __awaiter(this, void 0, void 0, function* () {
|
|
1105
|
+
(0, api_1.validateConfig)(config);
|
|
1106
|
+
return (0, event_1._fetchBlogDetails)(config.baseUrl, config.token, blogId);
|
|
1107
|
+
}), [config, config.baseUrl, config.token]);
|
|
1075
1108
|
const fetchPortfolioEvents = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
1076
1109
|
(0, api_1.validateConfig)(config);
|
|
1077
1110
|
return (0, event_1._fetchPortfolioEvents)(config.baseUrl, config.token, portfolioId);
|
|
@@ -1212,6 +1245,7 @@ function EventAPIProvider(props) {
|
|
|
1212
1245
|
init,
|
|
1213
1246
|
initWithToken,
|
|
1214
1247
|
initWithoutToken,
|
|
1248
|
+
fetchEventSpeakers,
|
|
1215
1249
|
fetchEventRegistrations,
|
|
1216
1250
|
fetchEventDetails,
|
|
1217
1251
|
fetchExhibitions,
|
|
@@ -1430,6 +1464,13 @@ function EventAPIProvider(props) {
|
|
|
1430
1464
|
createPortfolio,
|
|
1431
1465
|
updatePortfolio,
|
|
1432
1466
|
fetchPortfolioDetails,
|
|
1467
|
+
fetchBlogs,
|
|
1468
|
+
deleteBlog,
|
|
1469
|
+
assignBlog,
|
|
1470
|
+
unassignBlog,
|
|
1471
|
+
createBlog,
|
|
1472
|
+
updateBlog,
|
|
1473
|
+
fetchBlogDetails,
|
|
1433
1474
|
fetchPortfolioEvents,
|
|
1434
1475
|
fetchBlogPages,
|
|
1435
1476
|
createBlogPage,
|
|
@@ -1494,6 +1535,7 @@ function EventAPIProvider(props) {
|
|
|
1494
1535
|
} }, props.children));
|
|
1495
1536
|
}
|
|
1496
1537
|
exports.BaseAPI = {
|
|
1538
|
+
fetchEventSpeakers: event_1._fetchEventSpeakers,
|
|
1497
1539
|
fetchEventRegistrations: event_1._fetchEventRegistrations,
|
|
1498
1540
|
fetchExhibitions: event_1._fetchExhibitions,
|
|
1499
1541
|
fetchEventDetails: event_1._fetchEventDetails,
|
|
@@ -1715,6 +1757,13 @@ exports.BaseAPI = {
|
|
|
1715
1757
|
createPortfolio: event_1._createPortfolio,
|
|
1716
1758
|
updatePortfolio: event_1._updatePortfolio,
|
|
1717
1759
|
fetchPortfolioDetails: event_1._fetchPortfolioDetails,
|
|
1760
|
+
fetchBlogs: event_1._fetchBlogs,
|
|
1761
|
+
deleteBlog: event_1._deleteBlog,
|
|
1762
|
+
assignBlog: event_1._assignBlog,
|
|
1763
|
+
unassignBlog: event_1._unassignBlog,
|
|
1764
|
+
createBlog: event_1._createBlog,
|
|
1765
|
+
updateBlog: event_1._updateBlog,
|
|
1766
|
+
fetchBlogDetails: event_1._fetchBlogDetails,
|
|
1718
1767
|
fetchPortfolioEvents: event_1._fetchPortfolioEvents,
|
|
1719
1768
|
fetchBlogPages: event_1._fetchBlogPages,
|
|
1720
1769
|
createBlogPage: event_1._createBlogPage,
|
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, ExhibitionBulkUpdateInput, FaqInput, FileDetails, GroupServerResponse, GroupType, KeyTopicInput, KeyTopicResponse, OfferServerResponse, SpeakerAdvertInput, SessionBulkUpdateInput, OnsiteInput, OptionServerResponse, Portfolio, PortfolioInput, StatisticInput, StatisticResponse, Stream, StreamInput, TestimonialInput, TestimonialResponse, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
4
|
+
import { Account, AccountDetails, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, CreateOfferInput, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventSpeaker, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, ExhibitionBulkUpdateInput, FaqInput, FileDetails, GroupServerResponse, GroupType, KeyTopicInput, KeyTopicResponse, OfferServerResponse, SpeakerAdvertInput, SessionBulkUpdateInput, OnsiteInput, OptionServerResponse, Portfolio, PortfolioInput, Blog, BlogInput, 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";
|
|
@@ -75,6 +75,7 @@ export type ClientBase = {
|
|
|
75
75
|
ACTIONS_EVENTS: string;
|
|
76
76
|
ACTIONS_ATTENDEE: string;
|
|
77
77
|
PORTFOLIOS: string;
|
|
78
|
+
BLOGS: string;
|
|
78
79
|
};
|
|
79
80
|
export type BaseAPIType = {
|
|
80
81
|
addPostNative: (basePath: string, token: string, body: FormData) => Promise<Post>;
|
|
@@ -86,6 +87,7 @@ export type BaseAPIType = {
|
|
|
86
87
|
message: string;
|
|
87
88
|
}>;
|
|
88
89
|
approveOffer: (basePath: string, token: string, accountId: string, offerId: string) => Promise<OfferServerResponse>;
|
|
90
|
+
fetchEventSpeakers: (basePath: string, token: string, eventId: string) => Promise<EventSpeaker[]>;
|
|
89
91
|
fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
90
92
|
fetchExhibitions: (basePath: string, token: string, eventId: string) => Promise<Exhibition[]>;
|
|
91
93
|
fetchEventDetails: (basePath: string, token: string, eventId: string) => Promise<Event>;
|
|
@@ -329,6 +331,19 @@ export type BaseAPIType = {
|
|
|
329
331
|
value: File;
|
|
330
332
|
}[]) => Promise<Portfolio>;
|
|
331
333
|
fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
|
334
|
+
fetchBlogs: (basePath: string, token: string, accountId: string) => Promise<Blog[]>;
|
|
335
|
+
deleteBlog: (basePath: string, token: string, blogId: string) => Promise<APIResponse>;
|
|
336
|
+
assignBlog: (basePath: string, token: string, eventId: string, blogId: string) => Promise<APIResponse>;
|
|
337
|
+
unassignBlog: (basePath: string, token: string, eventId: string, blogId: string) => Promise<APIResponse>;
|
|
338
|
+
createBlog: (basePath: string, token: string, data: BlogInput, files: {
|
|
339
|
+
name: string;
|
|
340
|
+
value: File;
|
|
341
|
+
}[]) => Promise<Blog>;
|
|
342
|
+
updateBlog: (basePath: string, token: string, blogId: string, data: BlogInput, files: {
|
|
343
|
+
name: string;
|
|
344
|
+
value: File;
|
|
345
|
+
}[]) => Promise<Blog>;
|
|
346
|
+
fetchBlogDetails: (basePath: string, token: string, blogId: string) => Promise<Blog>;
|
|
332
347
|
fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
|
|
333
348
|
createBlogPage: (basePath: string, token: string, portfolioId: string, data: BlogPageInput, files: {
|
|
334
349
|
name: string;
|
|
@@ -414,6 +429,7 @@ export type EventAPIType = {
|
|
|
414
429
|
init: (baseUrl: string, email: string, password: string) => Promise<string>;
|
|
415
430
|
initWithToken: (baseUrl: string, token: string) => Promise<boolean>;
|
|
416
431
|
initWithoutToken: (baseUrl: string) => Promise<boolean>;
|
|
432
|
+
fetchEventSpeakers: (eventId: string) => Promise<EventSpeaker[]>;
|
|
417
433
|
fetchEventRegistrations: (eventId: string) => Promise<EventRegistration[]>;
|
|
418
434
|
fetchEventDetails: (eventId: string) => Promise<Event>;
|
|
419
435
|
fetchExhibitions: (eventId: string) => Promise<Exhibition[]>;
|
|
@@ -653,6 +669,19 @@ export type EventAPIType = {
|
|
|
653
669
|
value: File;
|
|
654
670
|
}[]) => Promise<Portfolio>;
|
|
655
671
|
fetchPortfolioDetails: (portfolioId: string) => Promise<Portfolio>;
|
|
672
|
+
fetchBlogs: (accountId: string) => Promise<Blog[]>;
|
|
673
|
+
deleteBlog: (blogId: string) => Promise<APIResponse>;
|
|
674
|
+
assignBlog: (eventId: string, blogId: string) => Promise<APIResponse>;
|
|
675
|
+
unassignBlog: (eventId: string, blogId: string) => Promise<APIResponse>;
|
|
676
|
+
createBlog: (data: BlogInput, files: {
|
|
677
|
+
name: string;
|
|
678
|
+
value: File;
|
|
679
|
+
}[]) => Promise<Blog>;
|
|
680
|
+
updateBlog: (blogId: string, data: BlogInput, files: {
|
|
681
|
+
name: string;
|
|
682
|
+
value: File;
|
|
683
|
+
}[]) => Promise<Blog>;
|
|
684
|
+
fetchBlogDetails: (blogId: string) => Promise<Blog>;
|
|
656
685
|
fetchPortfolioEvents: (portfolioId: string) => Promise<Event[]>;
|
|
657
686
|
createBlogPage: (portfolioId: string, data: BlogPageInput, files: {
|
|
658
687
|
name: string;
|
package/lib/utils/base.js
CHANGED
|
@@ -8,6 +8,7 @@ const getBasePath = (basePath) => {
|
|
|
8
8
|
return Object.freeze({
|
|
9
9
|
ACCOUNTS: `${authorizedBasePath}/accounts`,
|
|
10
10
|
PORTFOLIOS: `${authorizedBasePath}/portfolios`,
|
|
11
|
+
BLOGS: `${authorizedBasePath}/blogs`,
|
|
11
12
|
ADMIN: `${authorizedBasePath}/admin`,
|
|
12
13
|
ATTENDEES: `${authorizedBasePath}/attendees`,
|
|
13
14
|
AUTH: {
|