@hubs101/js-api-skd-client 1.0.10347 → 1.0.10348
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
|
@@ -107,3 +107,4 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
|
|
|
107
107
|
name: string;
|
|
108
108
|
value: File;
|
|
109
109
|
}[]) => Promise<any>;
|
|
110
|
+
export declare const _fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
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._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._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* () {
|
|
@@ -587,3 +587,9 @@ const _updatePortfolio = (basePath, token, portfolioId, data, files) => __awaite
|
|
|
587
587
|
return response;
|
|
588
588
|
});
|
|
589
589
|
exports._updatePortfolio = _updatePortfolio;
|
|
590
|
+
const _fetchPortfolioDetails = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
591
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
592
|
+
const { data: portfolioDetails } = yield (0, api_1.getRequest)(`${base.PORTFOLIOS}/${portfolioId}`, token);
|
|
593
|
+
return portfolioDetails;
|
|
594
|
+
});
|
|
595
|
+
exports._fetchPortfolioDetails = _fetchPortfolioDetails;
|
package/lib/index.js
CHANGED
|
@@ -861,6 +861,10 @@ function EventAPIProvider(props) {
|
|
|
861
861
|
(0, api_1.validateConfig)(config);
|
|
862
862
|
return (0, event_1._updatePortfolio)(config.baseUrl, config.token, portfolioId, data, files);
|
|
863
863
|
}), [config, config.baseUrl, config.token]);
|
|
864
|
+
const fetchPortfolioDetails = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
|
|
865
|
+
(0, api_1.validateConfig)(config);
|
|
866
|
+
return (0, event_1._fetchPortfolioDetails)(config.baseUrl, config.token, portfolioId);
|
|
867
|
+
}), [config, config.baseUrl, config.token]);
|
|
864
868
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
865
869
|
config,
|
|
866
870
|
init,
|
|
@@ -1061,6 +1065,7 @@ function EventAPIProvider(props) {
|
|
|
1061
1065
|
unassignPortfolio,
|
|
1062
1066
|
createPortfolio,
|
|
1063
1067
|
updatePortfolio,
|
|
1068
|
+
fetchPortfolioDetails,
|
|
1064
1069
|
} }, props.children));
|
|
1065
1070
|
}
|
|
1066
1071
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1262,5 +1267,6 @@ exports.BaseAPI = {
|
|
|
1262
1267
|
unassignPortfolio: event_1._unassignPortfolio,
|
|
1263
1268
|
createPortfolio: event_1._createPortfolio,
|
|
1264
1269
|
updatePortfolio: event_1._updatePortfolio,
|
|
1270
|
+
fetchPortfolioDetails: event_1._fetchPortfolioDetails,
|
|
1265
1271
|
};
|
|
1266
1272
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -290,6 +290,7 @@ export type BaseAPIType = {
|
|
|
290
290
|
name: string;
|
|
291
291
|
value: File;
|
|
292
292
|
}[]) => Promise<Portfolio>;
|
|
293
|
+
fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
|
|
293
294
|
};
|
|
294
295
|
export type EventAPIType = {
|
|
295
296
|
config: BaseAPIConfigType;
|
|
@@ -509,6 +510,7 @@ export type EventAPIType = {
|
|
|
509
510
|
name: string;
|
|
510
511
|
value: File;
|
|
511
512
|
}[]) => Promise<Portfolio>;
|
|
513
|
+
fetchPortfolioDetails: (portfolioId: string) => Promise<Portfolio>;
|
|
512
514
|
};
|
|
513
515
|
export type BaseAPIConfigType = {
|
|
514
516
|
baseUrl?: string;
|