@hubs101/js-api-skd-client 1.0.10591 → 1.0.10593
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 +2 -0
- package/lib/api/event/index.js +11 -2
- 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
|
@@ -3,6 +3,7 @@ import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../
|
|
|
3
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
|
+
import type { AttendeeProfile } from "../attendee/types";
|
|
6
7
|
import { Page } from "../pages/types";
|
|
7
8
|
export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
8
9
|
export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
|
|
@@ -162,3 +163,4 @@ export declare const _fetchPublicEventAdvertisement: (basePath: string, eventId:
|
|
|
162
163
|
export declare const _activateDataManagers: (basePath: string, token: string, eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
|
|
163
164
|
export declare const _deactivateDataManagers: (basePath: string, token: string, eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
|
|
164
165
|
export declare const _fetchAccountDocuments: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
|
|
166
|
+
export declare const _fetchAccountProfiles: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<AttendeeProfile>>;
|
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._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;
|
|
14
|
+
exports._fetchAccountProfiles = 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* () {
|
|
@@ -765,7 +765,7 @@ const _updateEventWebsite = (basePath, token, eventId, keyData, data, files) =>
|
|
|
765
765
|
exports._updateEventWebsite = _updateEventWebsite;
|
|
766
766
|
const _createTestimonial = (basePath, token, eventId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
767
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);
|
|
768
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.EVENTS}/${eventId}/testimonials`, data, files !== null && files !== void 0 ? files : [], token, "put");
|
|
769
769
|
return response === null || response === void 0 ? void 0 : response.data;
|
|
770
770
|
});
|
|
771
771
|
exports._createTestimonial = _createTestimonial;
|
|
@@ -839,3 +839,12 @@ const _fetchAccountDocuments = (basePath, token, accountId, params) => __awaiter
|
|
|
839
839
|
return (response === null || response === void 0 ? void 0 : response.data) || response;
|
|
840
840
|
});
|
|
841
841
|
exports._fetchAccountDocuments = _fetchAccountDocuments;
|
|
842
|
+
const _fetchAccountProfiles = (basePath, token, accountId, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
843
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
844
|
+
const url = params
|
|
845
|
+
? `${base.ACCOUNTS}/${accountId}/profiles?${params}`
|
|
846
|
+
: `${base.ACCOUNTS}/${accountId}/profiles`;
|
|
847
|
+
const response = yield (0, api_1.getRequest)(url, token);
|
|
848
|
+
return (response === null || response === void 0 ? void 0 : response.data) || response;
|
|
849
|
+
});
|
|
850
|
+
exports._fetchAccountProfiles = _fetchAccountProfiles;
|
package/lib/index.js
CHANGED
|
@@ -200,6 +200,10 @@ function EventAPIProvider(props) {
|
|
|
200
200
|
(0, api_1.validateConfig)(config);
|
|
201
201
|
return (0, event_1._fetchAccountDocuments)(config.baseUrl, config.token, accountId, params);
|
|
202
202
|
}), [config, config.baseUrl, config.token]);
|
|
203
|
+
const fetchAccountProfiles = (0, react_1.useCallback)((accountId, params) => __awaiter(this, void 0, void 0, function* () {
|
|
204
|
+
(0, api_1.validateConfig)(config);
|
|
205
|
+
return (0, event_1._fetchAccountProfiles)(config.baseUrl, config.token, accountId, params);
|
|
206
|
+
}), [config, config.baseUrl, config.token]);
|
|
203
207
|
const createOffer = (0, react_1.useCallback)((accountId, body, files) => __awaiter(this, void 0, void 0, function* () {
|
|
204
208
|
(0, api_1.validateConfig)(config);
|
|
205
209
|
return (0, event_1._createOffer)(config.baseUrl, config.token, accountId, body, files);
|
|
@@ -1177,6 +1181,7 @@ function EventAPIProvider(props) {
|
|
|
1177
1181
|
fetchEventAttendeeActions,
|
|
1178
1182
|
fetchAccountBookings,
|
|
1179
1183
|
fetchAccountDocuments,
|
|
1184
|
+
fetchAccountProfiles,
|
|
1180
1185
|
resendBookingEmail,
|
|
1181
1186
|
resendTicketEmail,
|
|
1182
1187
|
postTicketDetails,
|
|
@@ -1444,6 +1449,7 @@ exports.BaseAPI = {
|
|
|
1444
1449
|
fetchEventAttendeeActions: event_1._fetchEventAttendeeActions,
|
|
1445
1450
|
fetchAccountBookings: event_1._fetchAccountBookings,
|
|
1446
1451
|
fetchAccountDocuments: event_1._fetchAccountDocuments,
|
|
1452
|
+
fetchAccountProfiles: event_1._fetchAccountProfiles,
|
|
1447
1453
|
resendTicketEmail: event_1._resendTicketEmail,
|
|
1448
1454
|
resendBookingEmail: event_1._resendBookingEmail,
|
|
1449
1455
|
postTicketDetails: event_1._postTicketDetails,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -112,6 +112,7 @@ export type BaseAPIType = {
|
|
|
112
112
|
fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
|
|
113
113
|
fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
|
|
114
114
|
fetchAccountDocuments: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
|
|
115
|
+
fetchAccountProfiles: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<AttendeeProfile>>;
|
|
115
116
|
resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
|
|
116
117
|
resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
|
|
117
118
|
postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: any) => Promise<any>;
|
|
@@ -407,6 +408,7 @@ export type EventAPIType = {
|
|
|
407
408
|
fetchEventAttendeeActions: (eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
|
|
408
409
|
fetchAccountBookings: (accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
|
|
409
410
|
fetchAccountDocuments: (accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
|
|
411
|
+
fetchAccountProfiles: (accountId: string, params?: string) => Promise<ResponsePaginationType<AttendeeProfile>>;
|
|
410
412
|
resendTicketEmail: (ticketId: string) => Promise<any>;
|
|
411
413
|
resendBookingEmail: (bookingId: string) => Promise<any>;
|
|
412
414
|
postTicketDetails: (eventId: string, profileId: string, access: string, body: any) => Promise<ResponsePaginationType<BookingDetails>>;
|