@hubs101/js-api-skd-client 1.0.10228 → 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.
@@ -74,6 +74,7 @@ export type PathType = {
74
74
  PAYMENT_ACCOUNTS: string;
75
75
  ACCOUNT_TRIAL: string;
76
76
  INVITATION: string;
77
+ BOOKINGS: string;
77
78
  };
78
79
  export type SendResetPasswordBody = {
79
80
  password: string;
@@ -44,7 +44,9 @@ 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>>;
49
+ export declare const _acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
48
50
  export declare const _fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
49
51
  export declare const _createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
50
52
  export declare const _eventInvitationRegistration: (basePath: string, token: string, userId: string, data: any) => Promise<any>;
@@ -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._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;
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,12 +286,24 @@ 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}`);
292
298
  return data;
293
299
  });
294
300
  exports._fetchTicketDetails = _fetchTicketDetails;
301
+ const _acceptTicket = (basePath, ticketId, body) => __awaiter(void 0, void 0, void 0, function* () {
302
+ const base = (0, base_1.getBasePath)(basePath);
303
+ const response = yield (0, api_1.postRequestWE)(`${base.PUBLIC_TICKETS}/events/${ticketId}/accept`, body);
304
+ return response;
305
+ });
306
+ exports._acceptTicket = _acceptTicket;
295
307
  const _fetchEventBookings = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
296
308
  const base = (0, base_1.getBasePath)(basePath);
297
309
  const bookings = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/bookings?limit=1000`, token);
@@ -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";
@@ -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,6 +140,14 @@ 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 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* () {
148
+ (0, api_1.validateConfig)(config);
149
+ return (0, event_1._acceptTicket)(config.baseUrl, ticketId, body);
150
+ }), [config, config.baseUrl, config.token]);
143
151
  const fetchTicketDetails = (0, react_1.useCallback)((eventId, profileId, access) => __awaiter(this, void 0, void 0, function* () {
144
152
  (0, api_1.validateConfig)(config);
145
153
  return (0, event_1._fetchTicketDetails)(config.baseUrl, eventId, profileId, access);
@@ -779,6 +787,8 @@ function EventAPIProvider(props) {
779
787
  pinExhibition,
780
788
  unpinExhibition,
781
789
  fetchEventGroups,
790
+ assignTicket,
791
+ acceptTicket,
782
792
  fetchTicketDetails,
783
793
  fetchEventBookings,
784
794
  createFreeTrialAccount,
@@ -953,6 +963,8 @@ exports.BaseAPI = {
953
963
  pinExhibition: event_1._pinExhibition,
954
964
  unpinExhibition: event_1._unpinExhibition,
955
965
  fetchEventGroups: event_1._fetchEventGroups,
966
+ assignTicket: event_1._assignTicket,
967
+ acceptTicket: event_1._acceptTicket,
956
968
  fetchTicketDetails: event_1._fetchTicketDetails,
957
969
  fetchEventBookings: event_1._fetchEventBookings,
958
970
  createFreeTrialAccount: event_1._createFreeTrialAccount,
@@ -65,6 +65,8 @@ export type ClientBase = {
65
65
  ACCOUNT_TRIAL: string;
66
66
  INVITATION: string;
67
67
  PUBLIC_INVITATIONS: string;
68
+ PUBLIC_TICKETS: string;
69
+ BOOKINGS: string;
68
70
  };
69
71
  export type BaseAPIType = {
70
72
  fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
@@ -81,6 +83,8 @@ export type BaseAPIType = {
81
83
  pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
82
84
  unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
83
85
  fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
86
+ assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
87
+ acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
84
88
  fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
85
89
  fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
86
90
  createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
@@ -271,6 +275,8 @@ export type EventAPIType = {
271
275
  pinExhibition: (exhibitionId: string) => Promise<boolean>;
272
276
  unpinExhibition: (exhibitionId: string) => Promise<boolean>;
273
277
  fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
278
+ assignTicket: (bookingId: string, ticketId: string, data: any) => Promise<any>;
279
+ acceptTicket: (ticketId: string, body: any) => Promise<any>;
274
280
  fetchTicketDetails: (eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
275
281
  fetchEventBookings: (eventId: string) => Promise<ResponsePaginationType<Booking>>;
276
282
  createFreeTrialAccount: (data: any) => Promise<any>;
package/lib/utils/base.js CHANGED
@@ -61,6 +61,8 @@ const getBasePath = (basePath) => {
61
61
  ACCOUNT_TRIAL: `${unauthorizedBasePath}/accounts/trial`,
62
62
  INVITATION: `${unauthorizedBasePath}/invitation`,
63
63
  PUBLIC_INVITATIONS: `${publicBasePath}/invitations`,
64
+ PUBLIC_TICKETS: `${publicBasePath}/tickets`,
65
+ BOOKINGS: `${authorizedBasePath}/bookings`,
64
66
  });
65
67
  };
66
68
  exports.getBasePath = getBasePath;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10228",
3
+ "version": "1.0.10230",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",