@hubs101/js-api-skd-client 1.0.10349 → 1.0.10351
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 +1 -0
- package/lib/api/event/index.js +7 -1
- package/lib/index.js +6 -0
- package/lib/types/base.d.ts +2 -0
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -108,3 +108,4 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
|
|
|
108
108
|
value: File;
|
|
109
109
|
}[]) => Promise<any>;
|
|
110
110
|
export declare const _fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
|
111
|
+
export declare const _fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
|
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._fetchPortfolioDetails = 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;
|
|
13
|
+
exports._fetchPortfolioEvents = exports._fetchPortfolioDetails = 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* () {
|
|
@@ -593,3 +593,9 @@ const _fetchPortfolioDetails = (basePath, token, portfolioId) => __awaiter(void
|
|
|
593
593
|
return portfolioDetails;
|
|
594
594
|
});
|
|
595
595
|
exports._fetchPortfolioDetails = _fetchPortfolioDetails;
|
|
596
|
+
const _fetchPortfolioEvents = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
597
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
598
|
+
const { data: portfolioEvents } = yield (0, api_1.getRequest)(`${base.PORTFOLIOS}/${portfolioId}/events`, token);
|
|
599
|
+
return (portfolioEvents === null || portfolioEvents === void 0 ? void 0 : portfolioEvents.data) || portfolioEvents;
|
|
600
|
+
});
|
|
601
|
+
exports._fetchPortfolioEvents = _fetchPortfolioEvents;
|
package/lib/index.js
CHANGED
|
@@ -865,6 +865,10 @@ function EventAPIProvider(props) {
|
|
|
865
865
|
(0, api_1.validateConfig)(config);
|
|
866
866
|
return (0, event_1._fetchPortfolioDetails)(config.baseUrl, config.token, portfolioId);
|
|
867
867
|
}), [config, config.baseUrl, config.token]);
|
|
868
|
+
const fetchPortfolioEvents = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
869
|
+
(0, api_1.validateConfig)(config);
|
|
870
|
+
return (0, event_1._fetchPortfolioEvents)(config.baseUrl, config.token, portfolioId);
|
|
871
|
+
}), [config, config.baseUrl, config.token]);
|
|
868
872
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
869
873
|
config,
|
|
870
874
|
init,
|
|
@@ -1066,6 +1070,7 @@ function EventAPIProvider(props) {
|
|
|
1066
1070
|
createPortfolio,
|
|
1067
1071
|
updatePortfolio,
|
|
1068
1072
|
fetchPortfolioDetails,
|
|
1073
|
+
fetchPortfolioEvents,
|
|
1069
1074
|
} }, props.children));
|
|
1070
1075
|
}
|
|
1071
1076
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1268,5 +1273,6 @@ exports.BaseAPI = {
|
|
|
1268
1273
|
createPortfolio: event_1._createPortfolio,
|
|
1269
1274
|
updatePortfolio: event_1._updatePortfolio,
|
|
1270
1275
|
fetchPortfolioDetails: event_1._fetchPortfolioDetails,
|
|
1276
|
+
fetchPortfolioEvents: event_1._fetchPortfolioEvents,
|
|
1271
1277
|
};
|
|
1272
1278
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -291,6 +291,7 @@ export type BaseAPIType = {
|
|
|
291
291
|
value: File;
|
|
292
292
|
}[]) => Promise<Portfolio>;
|
|
293
293
|
fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
|
294
|
+
fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
|
|
294
295
|
};
|
|
295
296
|
export type EventAPIType = {
|
|
296
297
|
config: BaseAPIConfigType;
|
|
@@ -511,6 +512,7 @@ export type EventAPIType = {
|
|
|
511
512
|
value: File;
|
|
512
513
|
}[]) => Promise<Portfolio>;
|
|
513
514
|
fetchPortfolioDetails: (portfolioId: string) => Promise<Portfolio>;
|
|
515
|
+
fetchPortfolioEvents: (portfolioId: string) => Promise<Event[]>;
|
|
514
516
|
};
|
|
515
517
|
export type BaseAPIConfigType = {
|
|
516
518
|
baseUrl?: string;
|