@hubs101/js-api-skd-client 1.0.10229 → 1.0.10230
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/context/types.d.ts +1 -0
- package/lib/api/event/index.d.ts +1 -0
- package/lib/api/event/index.js +8 -2
- package/lib/constants/api.d.ts +2 -0
- package/lib/constants/api.js +2 -0
- package/lib/index.js +7 -1
- package/lib/types/base.d.ts +3 -0
- package/lib/utils/base.js +1 -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 _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
47
48
|
export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
48
49
|
export declare const _acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
|
|
49
50
|
export declare const _fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
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 = void 0;
|
|
12
|
+
exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = exports._fetchEventBookings = exports._acceptTicket = exports._fetchTicketDetails = exports._assignTicket = 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 = 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 _assignTicket = (basePath, token, bookingId, ticketId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
291
|
+
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BOOKINGS}/${bookingId}/assign/${ticketId}`, data, [], token);
|
|
292
|
+
return response;
|
|
293
|
+
});
|
|
294
|
+
exports._assignTicket = _assignTicket;
|
|
289
295
|
const _fetchTicketDetails = (basePath, eventId, profileId, access) => __awaiter(void 0, void 0, void 0, function* () {
|
|
290
296
|
const base = (0, base_1.getBasePath)(basePath);
|
|
291
297
|
const data = yield (0, api_1.getRequest)(`${base.PUBLIC_INVITATIONS}/events/${eventId}/profiles/${profileId}/tickets?access=${access}`);
|
package/lib/constants/api.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export declare const API_PROD_PATH: Readonly<{
|
|
|
59
59
|
PAYMENT_ACCOUNTS: `${string}/payment-account`;
|
|
60
60
|
ACCOUNT_TRIAL: `${string}/accounts/trial`;
|
|
61
61
|
INVITATION: `${string}/invitation`;
|
|
62
|
+
BOOKINGS: `${string}/bookings`;
|
|
62
63
|
}>;
|
|
63
64
|
export declare const API_STAGE_PATH: Readonly<{
|
|
64
65
|
ACCOUNTS: `${string}/accounts`;
|
|
@@ -110,6 +111,7 @@ export declare const API_STAGE_PATH: Readonly<{
|
|
|
110
111
|
PAYMENT_ACCOUNTS: `${string}/payment-account`;
|
|
111
112
|
ACCOUNT_TRIAL: `${string}/accounts/trial`;
|
|
112
113
|
INVITATION: `${string}/invitation`;
|
|
114
|
+
BOOKINGS: `${string}/bookings`;
|
|
113
115
|
}>;
|
|
114
116
|
export declare const ACTION_NAME: {
|
|
115
117
|
readonly VIEW: "view";
|
package/lib/constants/api.js
CHANGED
|
@@ -61,6 +61,7 @@ exports.API_PROD_PATH = Object.freeze({
|
|
|
61
61
|
PAYMENT_ACCOUNTS: `${exports.PRODUCTION_URL}/payment-account`,
|
|
62
62
|
ACCOUNT_TRIAL: `${exports.UNAUTHORIZED_PRODUCTION_URL}/accounts/trial`,
|
|
63
63
|
INVITATION: `${exports.UNAUTHORIZED_PRODUCTION_URL}/invitation`,
|
|
64
|
+
BOOKINGS: `${exports.PRODUCTION_URL}/bookings`,
|
|
64
65
|
});
|
|
65
66
|
exports.API_STAGE_PATH = Object.freeze({
|
|
66
67
|
ACCOUNTS: `${exports.STAGING_URL}/accounts`,
|
|
@@ -112,6 +113,7 @@ exports.API_STAGE_PATH = Object.freeze({
|
|
|
112
113
|
PAYMENT_ACCOUNTS: `${exports.STAGING_URL}/payment-account`,
|
|
113
114
|
ACCOUNT_TRIAL: `${exports.UNAUTHORIZED_STAGING_URL}/accounts/trial`,
|
|
114
115
|
INVITATION: `${exports.UNAUTHORIZED_STAGING_URL}/invitation`,
|
|
116
|
+
BOOKINGS: `${exports.STAGING_URL}/bookings`,
|
|
115
117
|
});
|
|
116
118
|
exports.ACTION_NAME = {
|
|
117
119
|
VIEW: "view",
|
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 assignTicket = (0, react_1.useCallback)((bookingId, ticketId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._assignTicket)(config.baseUrl, config.token, bookingId, ticketId, data);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
147
|
+
const acceptTicket = (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._acceptTicket)(config.baseUrl, ticketId, body);
|
|
146
150
|
}), [config, config.baseUrl, config.token]);
|
|
@@ -783,6 +787,7 @@ function EventAPIProvider(props) {
|
|
|
783
787
|
pinExhibition,
|
|
784
788
|
unpinExhibition,
|
|
785
789
|
fetchEventGroups,
|
|
790
|
+
assignTicket,
|
|
786
791
|
acceptTicket,
|
|
787
792
|
fetchTicketDetails,
|
|
788
793
|
fetchEventBookings,
|
|
@@ -958,6 +963,7 @@ exports.BaseAPI = {
|
|
|
958
963
|
pinExhibition: event_1._pinExhibition,
|
|
959
964
|
unpinExhibition: event_1._unpinExhibition,
|
|
960
965
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
966
|
+
assignTicket: event_1._assignTicket,
|
|
961
967
|
acceptTicket: event_1._acceptTicket,
|
|
962
968
|
fetchTicketDetails: event_1._fetchTicketDetails,
|
|
963
969
|
fetchEventBookings: event_1._fetchEventBookings,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -66,6 +66,7 @@ export type ClientBase = {
|
|
|
66
66
|
INVITATION: string;
|
|
67
67
|
PUBLIC_INVITATIONS: string;
|
|
68
68
|
PUBLIC_TICKETS: string;
|
|
69
|
+
BOOKINGS: string;
|
|
69
70
|
};
|
|
70
71
|
export type BaseAPIType = {
|
|
71
72
|
fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
@@ -82,6 +83,7 @@ export type BaseAPIType = {
|
|
|
82
83
|
pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
83
84
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
84
85
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
86
|
+
assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
85
87
|
acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
|
|
86
88
|
fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
87
89
|
fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
@@ -273,6 +275,7 @@ export type EventAPIType = {
|
|
|
273
275
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
274
276
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
275
277
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
278
|
+
assignTicket: (bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
276
279
|
acceptTicket: (ticketId: string, body: any) => Promise<any>;
|
|
277
280
|
fetchTicketDetails: (eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
278
281
|
fetchEventBookings: (eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
package/lib/utils/base.js
CHANGED
|
@@ -62,6 +62,7 @@ const getBasePath = (basePath) => {
|
|
|
62
62
|
INVITATION: `${unauthorizedBasePath}/invitation`,
|
|
63
63
|
PUBLIC_INVITATIONS: `${publicBasePath}/invitations`,
|
|
64
64
|
PUBLIC_TICKETS: `${publicBasePath}/tickets`,
|
|
65
|
+
BOOKINGS: `${authorizedBasePath}/bookings`,
|
|
65
66
|
});
|
|
66
67
|
};
|
|
67
68
|
exports.getBasePath = getBasePath;
|