@hubs101/js-api-skd-client 1.0.10271 → 1.0.10273
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/api/event/types.d.ts +26 -0
- package/lib/index.js +7 -1
- package/lib/types/base.d.ts +2 -0
- package/lib/utils/base.js +1 -1
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export declare const _unpinDocument: (basePath: string, token: string, eventId:
|
|
|
45
45
|
export declare const _pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
46
46
|
export declare const _unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
47
47
|
export declare const _fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
48
|
+
export declare const _checkBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
48
49
|
export declare const _fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
49
50
|
export declare const _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
50
51
|
export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
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._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 = void 0;
|
|
12
|
+
exports._acceptInternTicket = exports._acceptTicket = exports._fetchTicketDetails = exports._assignTicket = exports._fetchMyBookings = exports._checkBooking = 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._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._fetchEventBookings = 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* () {
|
|
@@ -292,6 +292,12 @@ const _fetchEventGroups = (basePath, token, eventId) => __awaiter(void 0, void 0
|
|
|
292
292
|
return groups;
|
|
293
293
|
});
|
|
294
294
|
exports._fetchEventGroups = _fetchEventGroups;
|
|
295
|
+
const _checkBooking = (basePath, body, lang) => __awaiter(void 0, void 0, void 0, function* () {
|
|
296
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
297
|
+
const response = yield (0, api_1.postRequestWE)(`${base.BOOKINGS}/bookings/check?lang=${lang}`, body);
|
|
298
|
+
return response;
|
|
299
|
+
});
|
|
300
|
+
exports._checkBooking = _checkBooking;
|
|
295
301
|
const _fetchMyBookings = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
296
302
|
const base = (0, base_1.getBasePath)(basePath);
|
|
297
303
|
const response = yield (0, api_1.getRequest)(`${base.USERS}/bookings?limit=2000`, token);
|
package/lib/api/event/types.d.ts
CHANGED
|
@@ -712,4 +712,30 @@ export type BookingDetails = {
|
|
|
712
712
|
reference: string;
|
|
713
713
|
};
|
|
714
714
|
};
|
|
715
|
+
export type BookingsFormInput = {
|
|
716
|
+
salutation: string;
|
|
717
|
+
first_name: string;
|
|
718
|
+
last_name: string;
|
|
719
|
+
job_title: string;
|
|
720
|
+
job_level: string;
|
|
721
|
+
job_responsibility: string;
|
|
722
|
+
company_size: string;
|
|
723
|
+
company_industry: string;
|
|
724
|
+
address_country: string;
|
|
725
|
+
contact_email: string;
|
|
726
|
+
type_of_business: string;
|
|
727
|
+
invoice_full_name: string;
|
|
728
|
+
company_name: string;
|
|
729
|
+
vat_id: string;
|
|
730
|
+
address_street: string;
|
|
731
|
+
additional_details: string;
|
|
732
|
+
address_postal_code: string;
|
|
733
|
+
address_city: string;
|
|
734
|
+
card_number: string;
|
|
735
|
+
card_holder: string;
|
|
736
|
+
expiry_date: string;
|
|
737
|
+
cvc: string;
|
|
738
|
+
contact_phone: string;
|
|
739
|
+
po_number: string;
|
|
740
|
+
};
|
|
715
741
|
export {};
|
package/lib/index.js
CHANGED
|
@@ -140,7 +140,11 @@ 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
|
|
143
|
+
const checkBooking = (0, react_1.useCallback)((body, lang) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchEventOrderedTickets)(config.baseUrl, body, lang);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
147
|
+
const fetchEventOrderedTickets = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, event_1._fetchEventOrderedTickets)(config.baseUrl, config.token, eventId);
|
|
146
150
|
}), [config, config.baseUrl, config.token]);
|
|
@@ -811,6 +815,7 @@ function EventAPIProvider(props) {
|
|
|
811
815
|
pinExhibition,
|
|
812
816
|
unpinExhibition,
|
|
813
817
|
fetchEventGroups,
|
|
818
|
+
checkBooking,
|
|
814
819
|
fetchEventOrderedTickets,
|
|
815
820
|
acceptInternTicket,
|
|
816
821
|
fetchTickets,
|
|
@@ -993,6 +998,7 @@ exports.BaseAPI = {
|
|
|
993
998
|
pinExhibition: event_1._pinExhibition,
|
|
994
999
|
unpinExhibition: event_1._unpinExhibition,
|
|
995
1000
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
1001
|
+
checkBooking: event_1._checkBooking,
|
|
996
1002
|
fetchEventOrderedTickets: event_1._fetchEventOrderedTickets,
|
|
997
1003
|
acceptInternTicket: event_1._acceptInternTicket,
|
|
998
1004
|
fetchTickets: event_1._fetchTickets,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -84,6 +84,7 @@ export type BaseAPIType = {
|
|
|
84
84
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
85
85
|
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
86
86
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
87
|
+
checkBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
87
88
|
fetchEventOrderedTickets: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
88
89
|
acceptInternTicket: (basePath: string, token: string, ticketId: string, body: any) => Promise<any>;
|
|
89
90
|
fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
@@ -281,6 +282,7 @@ export type EventAPIType = {
|
|
|
281
282
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
282
283
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
283
284
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
285
|
+
checkBooking: (body: any, lang: string) => Promise<any>;
|
|
284
286
|
fetchEventOrderedTickets: (eventId: string) => Promise<any>;
|
|
285
287
|
acceptInternTicket: (ticketId: string, body: any) => Promise<any>;
|
|
286
288
|
fetchTickets: () => Promise<ResponsePaginationType<BookingDetails>>;
|
package/lib/utils/base.js
CHANGED
|
@@ -60,7 +60,7 @@ const getBasePath = (basePath) => {
|
|
|
60
60
|
STREAMS: `${authorizedBasePath}/streams`,
|
|
61
61
|
ACCOUNT_TRIAL: `${unauthorizedBasePath}/accounts/trial`,
|
|
62
62
|
INVITATION: `${unauthorizedBasePath}/invitation`,
|
|
63
|
-
PUBLIC_INVITATIONS: `${
|
|
63
|
+
PUBLIC_INVITATIONS: `${unauthorizedBasePath}/invitations`,
|
|
64
64
|
PUBLIC_TICKETS: `${publicBasePath}/tickets`,
|
|
65
65
|
BOOKINGS: `${authorizedBasePath}/bookings`,
|
|
66
66
|
});
|