@hubs101/js-api-skd-client 1.0.10262 → 1.0.10265
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/README.md +1 -2
- package/lib/api/event/index.d.ts +2 -0
- package/lib/api/event/index.js +13 -2
- package/lib/index.js +12 -0
- package/lib/types/base.d.ts +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,8 +16,7 @@ Accessing API via stateless interface:
|
|
|
16
16
|
`import { EventAPIProvider } from '@hubs101/js-api-skd-client';`
|
|
17
17
|
2. Access api via hook:
|
|
18
18
|
` const { fetchAttendees } = useAPIContext();`
|
|
19
|
-
|
|
20
|
-
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
19
|
+
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
21
20
|
|
|
22
21
|
## Creating new release
|
|
23
22
|
|
package/lib/api/event/index.d.ts
CHANGED
|
@@ -51,6 +51,7 @@ export declare const _fetchTicketDetails: (basePath: string, eventId: string, pr
|
|
|
51
51
|
export declare const _acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
|
52
52
|
export declare const _acceptInternTicket: (basePath: string, token: string, ticketId: string, body: any) => Promise<any>;
|
|
53
53
|
export declare const _fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
54
|
+
export declare const _fetchEventOrderedTickets: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
54
55
|
export declare const _createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
|
|
55
56
|
export declare const _eventInvitationRegistration: (basePath: string, token: string, userId: string, data: any) => Promise<any>;
|
|
56
57
|
export declare const _fetchAccountDetails: (basePath: string, token: string, accountId: string) => Promise<any>;
|
|
@@ -68,6 +69,7 @@ export declare const _fetchEventOptions: (basePath: string, token: string, event
|
|
|
68
69
|
export declare const _assignPaymentAccount: (basePath: string, token: string, eventId: string, requestData: {
|
|
69
70
|
payment_account: string;
|
|
70
71
|
}) => Promise<any>;
|
|
72
|
+
export declare const _unassignPaymentAccount: (basePath: string, token: string, eventId: string, paymentAccountId: string) => Promise<any>;
|
|
71
73
|
export declare const _createEvent: (basePath: string, token: string, data: any, files: {
|
|
72
74
|
name: string;
|
|
73
75
|
value: File;
|
package/lib/api/event/index.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports._fetchEventBookings = exports._acceptInternTicket = 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 = exports._createFreeTrialAccount = 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 = 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* () {
|
|
@@ -324,10 +324,16 @@ const _acceptInternTicket = (basePath, token, ticketId, body) => __awaiter(void
|
|
|
324
324
|
exports._acceptInternTicket = _acceptInternTicket;
|
|
325
325
|
const _fetchEventBookings = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
326
326
|
const base = (0, base_1.getBasePath)(basePath);
|
|
327
|
-
const bookings = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/bookings?limit=
|
|
327
|
+
const bookings = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/bookings?limit=2000`, token);
|
|
328
328
|
return bookings;
|
|
329
329
|
});
|
|
330
330
|
exports._fetchEventBookings = _fetchEventBookings;
|
|
331
|
+
const _fetchEventOrderedTickets = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
332
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
333
|
+
const orderedTickets = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/ordered-tickets?limit=2000`, token);
|
|
334
|
+
return orderedTickets;
|
|
335
|
+
});
|
|
336
|
+
exports._fetchEventOrderedTickets = _fetchEventOrderedTickets;
|
|
331
337
|
const _createFreeTrialAccount = (basePath, token, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
332
338
|
const base = (0, base_1.getBasePath)(basePath);
|
|
333
339
|
const response = yield (0, api_1.postRequestWE)(base.ACCOUNT_TRIAL, data, token);
|
|
@@ -418,6 +424,11 @@ const _assignPaymentAccount = (basePath, token, eventId, requestData) => __await
|
|
|
418
424
|
return yield (0, api_1.postRequestWE)(`${base.EVENTS}/${eventId}/payment-accounts`, requestData, token);
|
|
419
425
|
});
|
|
420
426
|
exports._assignPaymentAccount = _assignPaymentAccount;
|
|
427
|
+
const _unassignPaymentAccount = (basePath, token, eventId, paymentAccountId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
428
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
429
|
+
return yield (0, api_1.deleteRequestWE)(`${base.EVENTS}/${eventId}/payment-accounts/${paymentAccountId}`, token);
|
|
430
|
+
});
|
|
431
|
+
exports._unassignPaymentAccount = _unassignPaymentAccount;
|
|
421
432
|
const _createEvent = (basePath, token, data, files) => __awaiter(void 0, void 0, void 0, function* () {
|
|
422
433
|
const base = (0, base_1.getBasePath)(basePath);
|
|
423
434
|
const { data: createdEvent } = yield (0, api_1.postFilesAndDataRequest)(base.EVENTS, data, files, 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 fetchEventOrderedTickets = react_1.default.useCallback((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchEventOrderedTickets)(config.baseUrl, config.token, eventId);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const acceptInternTicket = (0, react_1.useCallback)((ticketId, body) => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, event_1._acceptInternTicket)(config.baseUrl, config.token, ticketId, body);
|
|
@@ -435,6 +439,10 @@ function EventAPIProvider(props) {
|
|
|
435
439
|
(0, api_1.validateConfig)(config);
|
|
436
440
|
return (0, event_1._assignPaymentAccount)(config.baseUrl, config.token, eventId, requestData);
|
|
437
441
|
}), [config, config.baseUrl, config.token]);
|
|
442
|
+
const unassignPaymentAccount = (0, react_1.useCallback)((eventId, paymentAccountId) => __awaiter(this, void 0, void 0, function* () {
|
|
443
|
+
(0, api_1.validateConfig)(config);
|
|
444
|
+
return (0, event_1._unassignPaymentAccount)(config.baseUrl, config.token, eventId, paymentAccountId);
|
|
445
|
+
}), [config, config.baseUrl, config.token]);
|
|
438
446
|
const fetchAttendeeProfile = react_1.default.useCallback((attendeeId) => __awaiter(this, void 0, void 0, function* () {
|
|
439
447
|
(0, api_1.validateConfig)(config);
|
|
440
448
|
return (0, attendee_1._fetchAttendeeProfile)(config.baseUrl, config.token, attendeeId);
|
|
@@ -803,6 +811,7 @@ function EventAPIProvider(props) {
|
|
|
803
811
|
pinExhibition,
|
|
804
812
|
unpinExhibition,
|
|
805
813
|
fetchEventGroups,
|
|
814
|
+
fetchEventOrderedTickets,
|
|
806
815
|
acceptInternTicket,
|
|
807
816
|
fetchTickets,
|
|
808
817
|
getPublicRegistrationForm,
|
|
@@ -877,6 +886,7 @@ function EventAPIProvider(props) {
|
|
|
877
886
|
fetchEventTickets,
|
|
878
887
|
fetchEventOptions,
|
|
879
888
|
assignPaymentAccount,
|
|
889
|
+
unassignPaymentAccount,
|
|
880
890
|
fetchAttendeeProfile,
|
|
881
891
|
fetchAttendees,
|
|
882
892
|
fetchMyUser,
|
|
@@ -983,6 +993,7 @@ exports.BaseAPI = {
|
|
|
983
993
|
pinExhibition: event_1._pinExhibition,
|
|
984
994
|
unpinExhibition: event_1._unpinExhibition,
|
|
985
995
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
996
|
+
fetchEventOrderedTickets: event_1._fetchEventOrderedTickets,
|
|
986
997
|
acceptInternTicket: event_1._acceptInternTicket,
|
|
987
998
|
fetchTickets: event_1._fetchTickets,
|
|
988
999
|
getPublicRegistrationForm: public_1._getPublicRegistrationForm,
|
|
@@ -1056,6 +1067,7 @@ exports.BaseAPI = {
|
|
|
1056
1067
|
fetchEventTickets: event_1._fetchEventTickets,
|
|
1057
1068
|
fetchEventOptions: event_1._fetchEventOptions,
|
|
1058
1069
|
assignPaymentAccount: event_1._assignPaymentAccount,
|
|
1070
|
+
unassignPaymentAccount: event_1._unassignPaymentAccount,
|
|
1059
1071
|
fetchAttendeeProfile: attendee_1._fetchAttendeeProfile,
|
|
1060
1072
|
fetchAttendees: attendee_1._fetchAttendees,
|
|
1061
1073
|
fetchMyUser: attendee_1._fetchMyUser,
|
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
|
+
fetchEventOrderedTickets: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
87
88
|
acceptInternTicket: (basePath: string, token: string, ticketId: string, body: any) => Promise<any>;
|
|
88
89
|
fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
89
90
|
fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
@@ -161,6 +162,7 @@ export type BaseAPIType = {
|
|
|
161
162
|
assignPaymentAccount: (basePath: string, token: string, eventId: string, requestData: {
|
|
162
163
|
payment_account: string;
|
|
163
164
|
}) => Promise<any>;
|
|
165
|
+
unassignPaymentAccount: (basePath: string, token: string, eventId: string, paymentAccountId: string) => Promise<any>;
|
|
164
166
|
fetchAttendeeProfile: (basePath: string, token: string, attendeeId: string) => Promise<AttendeeProfile>;
|
|
165
167
|
fetchAttendees: (basePath: string, token: string, eventId: string) => Promise<AttendeeProfile[]>;
|
|
166
168
|
fetchMyUser: (basePath: string, token: string) => Promise<AttendeeProfile>;
|
|
@@ -279,6 +281,7 @@ export type EventAPIType = {
|
|
|
279
281
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
280
282
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
281
283
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
284
|
+
fetchEventOrderedTickets: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
282
285
|
acceptInternTicket: (ticketId: string, body: any) => Promise<any>;
|
|
283
286
|
fetchTickets: () => Promise<ResponsePaginationType<BookingDetails>>;
|
|
284
287
|
getPublicRegistrationForm: (eventId: string) => Promise<any>;
|
|
@@ -356,6 +359,7 @@ export type EventAPIType = {
|
|
|
356
359
|
assignPaymentAccount: (eventId: string, requestData: {
|
|
357
360
|
payment_account: string;
|
|
358
361
|
}) => Promise<any>;
|
|
362
|
+
unassignPaymentAccount: (eventId: string, paymentAccountId: string) => Promise<any>;
|
|
359
363
|
fetchEventTickets: (eventId: string) => Promise<TicketServerResponse[]>;
|
|
360
364
|
fetchEventOptions: (eventId: string) => Promise<OptionServerResponse[]>;
|
|
361
365
|
fetchAttendeeProfile: (attendeeId: string) => Promise<AttendeeProfile>;
|