@hubs101/js-api-skd-client 1.0.10315 → 1.0.10317

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 CHANGED
@@ -20,7 +20,7 @@ Accessing API via stateless interface:
20
20
 
21
21
  ## Creating new release
22
22
 
23
- 1. Commit al changes to git
23
+ 1. Commit al changes to git.
24
24
  2. Prepare build: `npm run build`
25
25
  3. Create new patch version run: `npm version patch`
26
26
  4. Publish package to NPM: `npm publish`
@@ -282,20 +282,12 @@ export type Note = {
282
282
  message: string;
283
283
  reference: string;
284
284
  event: string;
285
- detail: {
286
- title: string;
287
- subtitle: string;
288
- url: string;
289
- };
285
+ detail: unknown;
290
286
  updateDate: string;
291
287
  };
292
288
  export type NoteUpdateInput = {
293
289
  message: string;
294
- detail?: {
295
- title: string;
296
- subtitle: string;
297
- url: string;
298
- };
290
+ detail?: unknown;
299
291
  };
300
292
  export type NoteInput = {
301
293
  type: NOTE_TYPE;
@@ -50,6 +50,7 @@ export declare const _resendBookingEmail: (basePath: string, token: string, book
50
50
  export declare const _checkBooking: (basePath: string, body: any, lang: string) => Promise<any>;
51
51
  export declare const _createBooking: (basePath: string, body: any, lang: string) => Promise<any>;
52
52
  export declare const _fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
53
+ export declare const _fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
53
54
  export declare const _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
54
55
  export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
55
56
  export declare const _postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: 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._assignTicket = exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = exports._resendTicketEmail = 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._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 = exports._confirmBooking = exports._fetchEventBookings = exports._acceptInternTicket = exports._acceptTicket = exports._postTicketDetails = exports._fetchTicketDetails = void 0;
12
+ exports._fetchAccountBookings = exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = exports._resendTicketEmail = 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._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 = exports._confirmBooking = exports._fetchEventBookings = exports._acceptInternTicket = exports._acceptTicket = exports._postTicketDetails = exports._fetchTicketDetails = exports._assignTicket = 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* () {
@@ -323,6 +323,15 @@ const _fetchMyBookings = (basePath, token) => __awaiter(void 0, void 0, void 0,
323
323
  return response;
324
324
  });
325
325
  exports._fetchMyBookings = _fetchMyBookings;
326
+ const _fetchAccountBookings = (basePath, token, accountId, params) => __awaiter(void 0, void 0, void 0, function* () {
327
+ const base = (0, base_1.getBasePath)(basePath);
328
+ const url = params
329
+ ? `${base.ACCOUNTS}/${accountId}/bookings?limit=2000${params}`
330
+ : `${base.ACCOUNTS}/${accountId}/bookings?limit=2000`;
331
+ const response = yield (0, api_1.getRequest)(url, token);
332
+ return response;
333
+ });
334
+ exports._fetchAccountBookings = _fetchAccountBookings;
326
335
  const _assignTicket = (basePath, token, bookingId, ticketId, data) => __awaiter(void 0, void 0, void 0, function* () {
327
336
  const base = (0, base_1.getBasePath)(basePath);
328
337
  const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BOOKINGS}/${bookingId}/assign/${ticketId}`, data, [], 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 fetchAccountBookings = (0, react_1.useCallback)((accountId, params) => __awaiter(this, void 0, void 0, function* () {
144
+ (0, api_1.validateConfig)(config);
145
+ return (0, event_1._fetchAccountBookings)(config.baseUrl, config.token, accountId, params);
146
+ }), [config, config.baseUrl, config.token]);
143
147
  const resendTicketEmail = react_1.default.useCallback((ticketId) => __awaiter(this, void 0, void 0, function* () {
144
148
  (0, api_1.validateConfig)(config);
145
149
  return (0, event_1._resendTicketEmail)(config.baseUrl, config.token, ticketId);
@@ -847,6 +851,7 @@ function EventAPIProvider(props) {
847
851
  pinExhibition,
848
852
  unpinExhibition,
849
853
  fetchEventGroups,
854
+ fetchAccountBookings,
850
855
  resendBookingEmail,
851
856
  resendTicketEmail,
852
857
  postTicketDetails,
@@ -1038,6 +1043,7 @@ exports.BaseAPI = {
1038
1043
  pinExhibition: event_1._pinExhibition,
1039
1044
  unpinExhibition: event_1._unpinExhibition,
1040
1045
  fetchEventGroups: event_1._fetchEventGroups,
1046
+ fetchAccountBookings: event_1._fetchAccountBookings,
1041
1047
  resendTicketEmail: event_1._resendTicketEmail,
1042
1048
  resendBookingEmail: event_1._resendBookingEmail,
1043
1049
  postTicketDetails: event_1._postTicketDetails,
@@ -85,6 +85,7 @@ export type BaseAPIType = {
85
85
  unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
86
86
  getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
87
87
  fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
88
+ fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
88
89
  resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
89
90
  resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
90
91
  postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: any) => Promise<any>;
@@ -293,6 +294,7 @@ export type EventAPIType = {
293
294
  pinExhibition: (exhibitionId: string) => Promise<boolean>;
294
295
  unpinExhibition: (exhibitionId: string) => Promise<boolean>;
295
296
  fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
297
+ fetchAccountBookings: (accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
296
298
  resendTicketEmail: (ticketId: string) => Promise<any>;
297
299
  resendBookingEmail: (bookingId: string) => Promise<any>;
298
300
  postTicketDetails: (eventId: string, profileId: string, access: string, body: any) => Promise<ResponsePaginationType<BookingDetails>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10315",
3
+ "version": "1.0.10317",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",
@@ -12,7 +12,7 @@
12
12
  "preversion": "npm run lint",
13
13
  "version": "npm run format && git add -A src",
14
14
  "postversion": "git push && git push --tags",
15
- "new-version": "git pull ; npm run build && git commit -m \"update api\" -a --no-verify && npm version patch && npm publish"
15
+ "new-version": "git pull && npm run build && git commit -m \"update api\" -a --no-verify && npm version patch && npm publish"
16
16
  },
17
17
  "meta": {},
18
18
  "description": "Package for easy access to Event App API",
@@ -27,7 +27,6 @@
27
27
  ],
28
28
  "license": "ISC",
29
29
  "dependencies": {
30
- "@hubs101/js-api-skd-client": "^1.0.10314",
31
30
  "@types/react": "*",
32
31
  "react": "^18.2.0"
33
32
  },