@hubs101/js-api-skd-client 1.0.10225 → 1.0.10226
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 +3 -0
- package/lib/utils/base.js +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 _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<any>;
|
|
47
48
|
export declare const _fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
48
49
|
export declare const _createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
|
|
49
50
|
export declare const _eventInvitationRegistration: (basePath: string, token: string, userId: string, data: 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 = void 0;
|
|
12
|
+
exports._fetchEditableEvents = exports._fetchSpeakers = exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = exports._fetchEventBookings = exports._fetchTicketDetails = 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 = 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 _fetchTicketDetails = (basePath, eventId, profileId, access) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
291
|
+
const data = yield (0, api_1.getRequest)(`${base.PUBLIC_INVITATIONS}/events/${eventId}/profiles/${profileId}/tickets?access=${access}`);
|
|
292
|
+
return data;
|
|
293
|
+
});
|
|
294
|
+
exports._fetchTicketDetails = _fetchTicketDetails;
|
|
289
295
|
const _fetchEventBookings = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
296
|
const base = (0, base_1.getBasePath)(basePath);
|
|
291
297
|
const bookings = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/bookings?limit=1000`, 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 fetchTicketDetails = (0, react_1.useCallback)((eventId, profileId, access) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchTicketDetails)(config.baseUrl, eventId, profileId, access);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const fetchEventBookings = (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._fetchEventBookings)(config.baseUrl, config.token, eventId);
|
|
@@ -775,6 +779,7 @@ function EventAPIProvider(props) {
|
|
|
775
779
|
pinExhibition,
|
|
776
780
|
unpinExhibition,
|
|
777
781
|
fetchEventGroups,
|
|
782
|
+
fetchTicketDetails,
|
|
778
783
|
fetchEventBookings,
|
|
779
784
|
createFreeTrialAccount,
|
|
780
785
|
eventInvitationRegistration,
|
|
@@ -948,6 +953,7 @@ exports.BaseAPI = {
|
|
|
948
953
|
pinExhibition: event_1._pinExhibition,
|
|
949
954
|
unpinExhibition: event_1._unpinExhibition,
|
|
950
955
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
956
|
+
fetchTicketDetails: event_1._fetchTicketDetails,
|
|
951
957
|
fetchEventBookings: event_1._fetchEventBookings,
|
|
952
958
|
createFreeTrialAccount: event_1._createFreeTrialAccount,
|
|
953
959
|
eventInvitationRegistration: event_1._eventInvitationRegistration,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -64,6 +64,7 @@ export type ClientBase = {
|
|
|
64
64
|
STREAMS: string;
|
|
65
65
|
ACCOUNT_TRIAL: string;
|
|
66
66
|
INVITATION: string;
|
|
67
|
+
PUBLIC_INVITATIONS: string;
|
|
67
68
|
};
|
|
68
69
|
export type BaseAPIType = {
|
|
69
70
|
fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
@@ -80,6 +81,7 @@ export type BaseAPIType = {
|
|
|
80
81
|
pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
81
82
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
82
83
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
84
|
+
fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<any>;
|
|
83
85
|
fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
84
86
|
createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
|
|
85
87
|
eventInvitationRegistration: (basePath: string, token: string, userId: string, data: any) => Promise<any>;
|
|
@@ -269,6 +271,7 @@ export type EventAPIType = {
|
|
|
269
271
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
270
272
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
271
273
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
274
|
+
fetchTicketDetails: (eventId: string, profileId: string, access: string) => Promise<any>;
|
|
272
275
|
fetchEventBookings: (eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
273
276
|
createFreeTrialAccount: (data: any) => Promise<any>;
|
|
274
277
|
eventInvitationRegistration: (userId: string, data: any) => Promise<any>;
|
package/lib/utils/base.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.getBasePath = void 0;
|
|
|
4
4
|
const getBasePath = (basePath) => {
|
|
5
5
|
const authorizedBasePath = `${basePath}/api/v1`;
|
|
6
6
|
const unauthorizedBasePath = `${basePath}/v1`;
|
|
7
|
+
const publicBasePath = `${basePath}/public`;
|
|
7
8
|
return Object.freeze({
|
|
8
9
|
ACCOUNTS: `${authorizedBasePath}/accounts`,
|
|
9
10
|
ADMIN: `${authorizedBasePath}/admin`,
|
|
@@ -59,6 +60,7 @@ const getBasePath = (basePath) => {
|
|
|
59
60
|
STREAMS: `${authorizedBasePath}/streams`,
|
|
60
61
|
ACCOUNT_TRIAL: `${unauthorizedBasePath}/accounts/trial`,
|
|
61
62
|
INVITATION: `${unauthorizedBasePath}/invitation`,
|
|
63
|
+
PUBLIC_INVITATIONS: `${publicBasePath}/invitations`,
|
|
62
64
|
});
|
|
63
65
|
};
|
|
64
66
|
exports.getBasePath = getBasePath;
|