@hubs101/js-api-skd-client 1.0.10246 → 1.0.10247
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 +8 -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
|
@@ -44,6 +44,7 @@ export declare const _unpinDocument: (basePath: string, token: string, eventId:
|
|
|
44
44
|
export declare const _pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
45
45
|
export declare const _unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
46
46
|
export declare const _fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
47
|
+
export declare const _fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
47
48
|
export declare const _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
48
49
|
export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
49
50
|
export declare const _acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -9,8 +9,8 @@ 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._deleteExhibition = exports._updateExhibition = exports._importExhibition = exports._createExhibition = exports._fetchMyExhibitions = exports._fetchAllExhibitions = exports._deleteStream = exports._updateStream = exports._createStream = exports._fetchYoutubeContent = exports._fetchZoomContent = exports._createEvent = exports._assignPaymentAccount = exports._fetchEventOptions = exports._fetchEventTickets = exports._updateEvent = exports._deletePage = exports._updatePage = exports._createPage = exports._fetchEventPages = exports._updateAccountWithFiles = exports._fetchMySessions = exports._fetchEditableEvents = exports._fetchSpeakers = void 0;
|
|
12
|
+
exports._eventInvitationRegistration = exports._createFreeTrialAccount = exports._fetchEventBookings = exports._acceptTicket = exports._fetchTicketDetails = exports._assignTicket = exports._fetchMyBookings = 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._fetchAccounts = exports._fetchEventRegistrations = void 0;
|
|
13
|
+
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._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 = 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* () {
|
|
@@ -286,6 +286,12 @@ const _fetchEventGroups = (basePath, token, eventId) => __awaiter(void 0, void 0
|
|
|
286
286
|
return groups;
|
|
287
287
|
});
|
|
288
288
|
exports._fetchEventGroups = _fetchEventGroups;
|
|
289
|
+
const _fetchMyBookings = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
291
|
+
const { data: groups } = yield (0, api_1.getRequest)(`${base.USERS}/bookings`, token);
|
|
292
|
+
return groups;
|
|
293
|
+
});
|
|
294
|
+
exports._fetchMyBookings = _fetchMyBookings;
|
|
289
295
|
const _assignTicket = (basePath, token, bookingId, ticketId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
296
|
const base = (0, base_1.getBasePath)(basePath);
|
|
291
297
|
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BOOKINGS}/${bookingId}/assign/${ticketId}`, data, [], token);
|
package/lib/index.js
CHANGED
|
@@ -140,6 +140,10 @@ function EventAPIProvider(props) {
|
|
|
140
140
|
(0, api_1.validateConfig)(config);
|
|
141
141
|
return (0, event_1._fetchEventGroups)(config.baseUrl, config.token, eventId);
|
|
142
142
|
}), [config, config.baseUrl, config.token]);
|
|
143
|
+
const fetchMyBookings = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchMyBookings)(config.baseUrl, config.token);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const assignTicket = (0, react_1.useCallback)((bookingId, ticketId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, event_1._assignTicket)(config.baseUrl, config.token, bookingId, ticketId, data);
|
|
@@ -787,6 +791,7 @@ function EventAPIProvider(props) {
|
|
|
787
791
|
pinExhibition,
|
|
788
792
|
unpinExhibition,
|
|
789
793
|
fetchEventGroups,
|
|
794
|
+
fetchMyBookings,
|
|
790
795
|
assignTicket,
|
|
791
796
|
acceptTicket,
|
|
792
797
|
fetchTicketDetails,
|
|
@@ -963,6 +968,7 @@ exports.BaseAPI = {
|
|
|
963
968
|
pinExhibition: event_1._pinExhibition,
|
|
964
969
|
unpinExhibition: event_1._unpinExhibition,
|
|
965
970
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
971
|
+
fetchMyBookings: event_1._fetchMyBookings,
|
|
966
972
|
assignTicket: event_1._assignTicket,
|
|
967
973
|
acceptTicket: event_1._acceptTicket,
|
|
968
974
|
fetchTicketDetails: event_1._fetchTicketDetails,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -83,6 +83,7 @@ export type BaseAPIType = {
|
|
|
83
83
|
pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
84
84
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
85
85
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
86
|
+
fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
86
87
|
assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
87
88
|
acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
|
88
89
|
fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
@@ -275,6 +276,7 @@ export type EventAPIType = {
|
|
|
275
276
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
276
277
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
277
278
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
279
|
+
fetchMyBookings: () => Promise<ResponsePaginationType<Booking>>;
|
|
278
280
|
assignTicket: (bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
279
281
|
acceptTicket: (ticketId: string, access: string, body: any) => Promise<any>;
|
|
280
282
|
fetchTicketDetails: (eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|