@hubs101/js-api-skd-client 1.0.10256 → 1.0.10258
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
|
@@ -3,6 +3,7 @@ import { ExhibitionReport } from "../types";
|
|
|
3
3
|
import { Account, AccountInput, Booking, BookingDetails, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
|
|
4
4
|
export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
5
5
|
export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
|
|
6
|
+
export declare const _fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
6
7
|
export declare const _fetchEventsForAccount: (basePath: string, token: string, accountId: string) => Promise<Event[]>;
|
|
7
8
|
export declare const _fetchExhibitions: (basePath: string, token: string, eventId: string) => Promise<Exhibition[]>;
|
|
8
9
|
export declare const _fetchEventDetails: (basePath: string, token: string, eventId: string) => Promise<Event>;
|
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 = exports._fetchAccountDetails = void 0;
|
|
12
|
+
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._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._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 = 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* () {
|
|
@@ -25,6 +25,12 @@ const _fetchAccounts = (basePath, token) => __awaiter(void 0, void 0, void 0, fu
|
|
|
25
25
|
return eventRegistrations;
|
|
26
26
|
});
|
|
27
27
|
exports._fetchAccounts = _fetchAccounts;
|
|
28
|
+
const _fetchTickets = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
30
|
+
const data = yield (0, api_1.getRequest)(`${base.USERS}/tickets`, token);
|
|
31
|
+
return data;
|
|
32
|
+
});
|
|
33
|
+
exports._fetchTickets = _fetchTickets;
|
|
28
34
|
const _fetchEventsForAccount = (basePath, token, accountId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
29
35
|
const base = (0, base_1.getBasePath)(basePath);
|
|
30
36
|
const { data: eventRegistrations } = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/events`, 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 fetchTickets = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchTickets)(config.baseUrl, config.token);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const getPublicRegistrationForm = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, public_1._getPublicRegistrationForm)(config.baseUrl, eventId);
|
|
@@ -795,6 +799,7 @@ function EventAPIProvider(props) {
|
|
|
795
799
|
pinExhibition,
|
|
796
800
|
unpinExhibition,
|
|
797
801
|
fetchEventGroups,
|
|
802
|
+
fetchTickets,
|
|
798
803
|
getPublicRegistrationForm,
|
|
799
804
|
fetchMyBookings,
|
|
800
805
|
assignTicket,
|
|
@@ -973,6 +978,7 @@ exports.BaseAPI = {
|
|
|
973
978
|
pinExhibition: event_1._pinExhibition,
|
|
974
979
|
unpinExhibition: event_1._unpinExhibition,
|
|
975
980
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
981
|
+
fetchTickets: event_1._fetchTickets,
|
|
976
982
|
getPublicRegistrationForm: public_1._getPublicRegistrationForm,
|
|
977
983
|
fetchMyBookings: event_1._fetchMyBookings,
|
|
978
984
|
assignTicket: event_1._assignTicket,
|
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
|
+
fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
87
88
|
fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
88
89
|
assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
89
90
|
acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
|
@@ -277,6 +278,7 @@ export type EventAPIType = {
|
|
|
277
278
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
278
279
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
279
280
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
281
|
+
fetchTickets: () => Promise<ResponsePaginationType<BookingDetails>>;
|
|
280
282
|
getPublicRegistrationForm: (eventId: string) => Promise<any>;
|
|
281
283
|
fetchMyBookings: () => Promise<ResponsePaginationType<Booking>>;
|
|
282
284
|
assignTicket: (bookingId: string, ticketId: string, data: any) => Promise<any>;
|