@hubs101/js-api-skd-client 1.0.10335 → 1.0.10337
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 +6 -1
- package/lib/api/event/index.js +31 -1
- package/lib/api/event/types.d.ts +1 -0
- package/lib/index.js +30 -0
- package/lib/types/base.d.ts +11 -1
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GenericResponseServerType, ResponsePaginationType, ResponseServerType } from "../public/types";
|
|
2
2
|
import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../types";
|
|
3
|
-
import { Account, AccountInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
|
|
3
|
+
import { Account, AccountInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
|
|
4
4
|
export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
5
5
|
export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
|
|
6
6
|
export declare const _fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
@@ -96,3 +96,8 @@ export declare const _importExhibition: (basePath: string, token: string, eventI
|
|
|
96
96
|
export declare const _updateExhibition: (basePath: string, token: string, exhibitionId: string, files: any, data: ExhibitionInput) => Promise<Exhibition>;
|
|
97
97
|
export declare const _deleteExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<Response>;
|
|
98
98
|
export declare const _fetchPortfolios: (basePath: string, token: string, accountId: string) => Promise<Portfolio[]>;
|
|
99
|
+
export declare const _deletePortfolio: (basePath: string, token: string, portfolioId: string) => Promise<any>;
|
|
100
|
+
export declare const _assignPortfolio: (basePath: string, token: string, eventId: string, portfolioId: string) => Promise<any>;
|
|
101
|
+
export declare const _unassignPortfolio: (basePath: string, token: string, eventId: string, portfolioId: string) => Promise<any>;
|
|
102
|
+
export declare const _createPortfolio: (basePath: string, token: string, data: PortfolioInput) => Promise<any>;
|
|
103
|
+
export declare const _updatePortfolio: (basePath: string, token: string, portfolioId: string, data: PortfolioInput) => Promise<any>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = exports._resendTicketEmail = exports._fetchEventAttendeeActions = exports._fetchEventGroups = exports._unpinExhibition = exports._pinExhibition = exports._unpinDocument = exports._pinDocument = exports._reportExhibitionAction = exports._deleteDocument = exports._updateDocument = 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._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
|
-
exports._fetchPortfolios = 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._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 = void 0;
|
|
13
|
+
exports._updatePortfolio = exports._createPortfolio = exports._unassignPortfolio = exports._assignPortfolio = exports._deletePortfolio = exports._fetchPortfolios = 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._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 = void 0;
|
|
14
14
|
const api_1 = require("../../utils/api");
|
|
15
15
|
const base_1 = require("../../utils/base");
|
|
16
16
|
const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -557,3 +557,33 @@ const _fetchPortfolios = (basePath, token, accountId) => __awaiter(void 0, void
|
|
|
557
557
|
return accountPortfolios;
|
|
558
558
|
});
|
|
559
559
|
exports._fetchPortfolios = _fetchPortfolios;
|
|
560
|
+
const _deletePortfolio = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
561
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
562
|
+
const response = yield (0, api_1.deleteRequestWE)(`${base.PORTFOLIOS}/${portfolioId}`, token);
|
|
563
|
+
return response;
|
|
564
|
+
});
|
|
565
|
+
exports._deletePortfolio = _deletePortfolio;
|
|
566
|
+
const _assignPortfolio = (basePath, token, eventId, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
567
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
568
|
+
const response = yield (0, api_1.postRequestWE)(`${base.EVENTS}/${eventId}/portfolio`, { portfolioId }, token);
|
|
569
|
+
return response;
|
|
570
|
+
});
|
|
571
|
+
exports._assignPortfolio = _assignPortfolio;
|
|
572
|
+
const _unassignPortfolio = (basePath, token, eventId, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
573
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
574
|
+
const response = yield (0, api_1.deleteRequestWE)(`${base.EVENTS}/${eventId}/portfolio/${portfolioId}`, token);
|
|
575
|
+
return response;
|
|
576
|
+
});
|
|
577
|
+
exports._unassignPortfolio = _unassignPortfolio;
|
|
578
|
+
const _createPortfolio = (basePath, token, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
579
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
580
|
+
const response = yield (0, api_1.postRequestWE)(`${base.PORTFOLIOS}`, data, token);
|
|
581
|
+
return response;
|
|
582
|
+
});
|
|
583
|
+
exports._createPortfolio = _createPortfolio;
|
|
584
|
+
const _updatePortfolio = (basePath, token, portfolioId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
585
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
586
|
+
const response = yield (0, api_1.putRequest)(`${base.PORTFOLIOS}/${portfolioId}`, token, data);
|
|
587
|
+
return response;
|
|
588
|
+
});
|
|
589
|
+
exports._updatePortfolio = _updatePortfolio;
|
package/lib/api/event/types.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -841,6 +841,26 @@ function EventAPIProvider(props) {
|
|
|
841
841
|
(0, api_1.validateConfig)(config);
|
|
842
842
|
return (0, event_1._fetchPortfolios)(config.baseUrl, config.token, accountId);
|
|
843
843
|
}), [config, config.baseUrl, config.token]);
|
|
844
|
+
const deletePortfolio = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
845
|
+
(0, api_1.validateConfig)(config);
|
|
846
|
+
return (0, event_1._deletePortfolio)(config.baseUrl, config.token, portfolioId);
|
|
847
|
+
}), [config, config.baseUrl, config.token]);
|
|
848
|
+
const assignPortfolio = react_1.default.useCallback((eventId, portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
849
|
+
(0, api_1.validateConfig)(config);
|
|
850
|
+
return (0, event_1._assignPortfolio)(config.baseUrl, config.token, eventId, portfolioId);
|
|
851
|
+
}), [config, config.baseUrl, config.token]);
|
|
852
|
+
const unassignPortfolio = react_1.default.useCallback((eventId, portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
853
|
+
(0, api_1.validateConfig)(config);
|
|
854
|
+
return (0, event_1._unassignPortfolio)(config.baseUrl, config.token, eventId, portfolioId);
|
|
855
|
+
}), [config, config.baseUrl, config.token]);
|
|
856
|
+
const createPortfolio = react_1.default.useCallback((data) => __awaiter(this, void 0, void 0, function* () {
|
|
857
|
+
(0, api_1.validateConfig)(config);
|
|
858
|
+
return (0, event_1._createPortfolio)(config.baseUrl, config.token, data);
|
|
859
|
+
}), [config, config.baseUrl, config.token]);
|
|
860
|
+
const updatePortfolio = react_1.default.useCallback((portfolioId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
861
|
+
(0, api_1.validateConfig)(config);
|
|
862
|
+
return (0, event_1._updatePortfolio)(config.baseUrl, config.token, portfolioId, data);
|
|
863
|
+
}), [config, config.baseUrl, config.token]);
|
|
844
864
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
845
865
|
config,
|
|
846
866
|
init,
|
|
@@ -1036,6 +1056,11 @@ function EventAPIProvider(props) {
|
|
|
1036
1056
|
editMeeting,
|
|
1037
1057
|
fetchEventMeetingsStatistics,
|
|
1038
1058
|
fetchPortfolios,
|
|
1059
|
+
deletePortfolio,
|
|
1060
|
+
assignPortfolio,
|
|
1061
|
+
unassignPortfolio,
|
|
1062
|
+
createPortfolio,
|
|
1063
|
+
updatePortfolio,
|
|
1039
1064
|
} }, props.children));
|
|
1040
1065
|
}
|
|
1041
1066
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1232,5 +1257,10 @@ exports.BaseAPI = {
|
|
|
1232
1257
|
editMeeting: meetings_1._editMeeting,
|
|
1233
1258
|
fetchEventMeetingsStatistics: meetings_1._fetchEventMeetingsStatistics,
|
|
1234
1259
|
fetchPortfolios: event_1._fetchPortfolios,
|
|
1260
|
+
deletePortfolio: event_1._deletePortfolio,
|
|
1261
|
+
assignPortfolio: event_1._assignPortfolio,
|
|
1262
|
+
unassignPortfolio: event_1._unassignPortfolio,
|
|
1263
|
+
createPortfolio: event_1._createPortfolio,
|
|
1264
|
+
updatePortfolio: event_1._updatePortfolio,
|
|
1235
1265
|
};
|
|
1236
1266
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNo
|
|
|
2
2
|
import { RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
|
|
3
3
|
import { CalendarEvent } from "../api/calendar/types";
|
|
4
4
|
import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
|
|
5
|
-
import { Account, AccountInput, Answer, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
5
|
+
import { Account, AccountInput, Answer, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
6
6
|
import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
|
|
7
7
|
import { Page } from "../api/pages/types";
|
|
8
8
|
import { CommentBody, Post, PostBody, UpdatePostBody } from "../api/posts/types";
|
|
@@ -279,6 +279,11 @@ export type BaseAPIType = {
|
|
|
279
279
|
editMeeting: (basePath: string, token: string, body: MeetingItem) => Promise<MeetingItem>;
|
|
280
280
|
fetchEventMeetingsStatistics: (basePath: string, token: string, eventId: string) => Promise<EventMeetingStatisticsItem[]>;
|
|
281
281
|
fetchPortfolios: (basePath: string, token: string, accountId: string) => Promise<Portfolio[]>;
|
|
282
|
+
deletePortfolio: (basePath: string, token: string, portfolioId: string) => Promise<Response>;
|
|
283
|
+
assignPortfolio: (basePath: string, token: string, eventId: string, portfolioId: string) => Promise<Response>;
|
|
284
|
+
unassignPortfolio: (basePath: string, token: string, eventId: string, portfolioId: string) => Promise<Response>;
|
|
285
|
+
createPortfolio: (basePath: string, token: string, data: PortfolioInput) => Promise<Portfolio>;
|
|
286
|
+
updatePortfolio: (basePath: string, token: string, portfolioId: string, data: PortfolioInput) => Promise<Portfolio>;
|
|
282
287
|
};
|
|
283
288
|
export type EventAPIType = {
|
|
284
289
|
config: BaseAPIConfigType;
|
|
@@ -487,6 +492,11 @@ export type EventAPIType = {
|
|
|
487
492
|
editMeeting: (body: MeetingItem) => Promise<MeetingItem>;
|
|
488
493
|
fetchEventMeetingsStatistics: (eventId: string) => Promise<EventMeetingStatisticsItem[]>;
|
|
489
494
|
fetchPortfolios: (accountId: string) => Promise<Portfolio[]>;
|
|
495
|
+
deletePortfolio: (portfolioId: string) => Promise<Response>;
|
|
496
|
+
assignPortfolio: (eventId: string, portfolioId: string) => Promise<Response>;
|
|
497
|
+
unassignPortfolio: (eventId: string, portfolioId: string) => Promise<Response>;
|
|
498
|
+
createPortfolio: (data: PortfolioInput) => Promise<Portfolio>;
|
|
499
|
+
updatePortfolio: (portfolioId: string, data: PortfolioInput) => Promise<Portfolio>;
|
|
490
500
|
};
|
|
491
501
|
export type BaseAPIConfigType = {
|
|
492
502
|
baseUrl?: string;
|