@hubs101/js-api-skd-client 1.0.10548 → 1.0.10550

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.
@@ -1,5 +1,5 @@
1
1
  import { LoginResponse, ResetPasswordBody, SendResetPasswordBody } from "../context/types";
2
- import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PackageType, RegisterManagerInput, ResponseAccountEventsType, SessionType } from "./types";
2
+ import { ColocatedEventDetailsResponse, ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PackageType, RegisterManagerInput, ResponseAccountEventsType, SessionType } from "./types";
3
3
  import { APIResponse } from "../../types/base";
4
4
  import { AccountDetails, GroupType } from "../event/types";
5
5
  import { ResponsePaginationType } from "../public/types";
@@ -26,6 +26,7 @@ export declare const _fetchAccountGroups: (basePath: string, token: string, acco
26
26
  export declare const _createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
27
27
  export declare const _updateAccountGroup: (basePath: string, token: string, accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
28
28
  export declare const _fetchColocatedEvents: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
29
+ export declare const _fetchColocatedEventDetails: (basePath: string, token: string, accountId: string, eventId: string) => Promise<ColocatedEventDetailsResponse>;
29
30
  export declare const _createColocatedEvents: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
30
31
  export declare const _editColocatedEvents: (basePath: string, token: string, id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
31
32
  export declare const _deleteColocatedEvents: (basePath: string, token: string, id: string) => Promise<string>;
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports._updateSessionTypes = exports._fetchSessionTypes = exports._updatePackages = exports._deleteColocatedEvents = exports._editColocatedEvents = exports._createColocatedEvents = exports._fetchColocatedEvents = exports._updateAccountGroup = exports._createAccountGroup = exports._fetchAccountGroups = exports._fetchEventsByAccount = exports._fetchAccountEvents = exports._deletePaymentAccount = exports._deleteFinanceManager = exports._inviteFinanceManager = exports._confirmManagerNative = exports._confirmManager = exports._registerManagerNative = exports._registerManager = exports._deleteContentManager = exports._inviteContentManager = exports._updatePaymentAccount = exports._createPaymentAccount = exports._fetchPaymentAccounts = exports._fetchPaymentAccount = exports._sendNewPassword = exports._resetPassword = exports._logout = exports._login = void 0;
12
+ exports._updateSessionTypes = exports._fetchSessionTypes = exports._updatePackages = exports._deleteColocatedEvents = exports._editColocatedEvents = exports._createColocatedEvents = exports._fetchColocatedEventDetails = exports._fetchColocatedEvents = exports._updateAccountGroup = exports._createAccountGroup = exports._fetchAccountGroups = exports._fetchEventsByAccount = exports._fetchAccountEvents = exports._deletePaymentAccount = exports._deleteFinanceManager = exports._inviteFinanceManager = exports._confirmManagerNative = exports._confirmManager = exports._registerManagerNative = exports._registerManager = exports._deleteContentManager = exports._inviteContentManager = exports._updatePaymentAccount = exports._createPaymentAccount = exports._fetchPaymentAccounts = exports._fetchPaymentAccount = exports._sendNewPassword = exports._resetPassword = exports._logout = exports._login = void 0;
13
13
  const api_1 = require("../../utils/api");
14
14
  const base_1 = require("../../utils/base");
15
15
  const _login = (basePath, email, password) => __awaiter(void 0, void 0, void 0, function* () {
@@ -160,6 +160,12 @@ const _fetchColocatedEvents = (basePath, token, accountId) => __awaiter(void 0,
160
160
  return groups;
161
161
  });
162
162
  exports._fetchColocatedEvents = _fetchColocatedEvents;
163
+ const _fetchColocatedEventDetails = (basePath, token, accountId, eventId) => __awaiter(void 0, void 0, void 0, function* () {
164
+ const base = (0, base_1.getBasePath)(basePath);
165
+ const eventDetails = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/colocated-events/${eventId}`, token);
166
+ return (eventDetails === null || eventDetails === void 0 ? void 0 : eventDetails.data) || eventDetails;
167
+ });
168
+ exports._fetchColocatedEventDetails = _fetchColocatedEventDetails;
163
169
  const _createColocatedEvents = (basePath, token, accountId, data) => __awaiter(void 0, void 0, void 0, function* () {
164
170
  const base = (0, base_1.getBasePath)(basePath);
165
171
  const groups = yield (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/colocated-events`, data, token);
@@ -81,3 +81,15 @@ export type SessionType = {
81
81
  description_en: string;
82
82
  event_type: "onsite" | "virtual" | "hybrid";
83
83
  };
84
+ export type ColocatedEventDetailsEvent = {
85
+ event_id: string;
86
+ event_name: string;
87
+ event_start_date: string;
88
+ event_end_date: string;
89
+ event_timezone: string;
90
+ };
91
+ export type ColocatedEventDetailsResponse = {
92
+ event_colocated_id: string;
93
+ event_colocated_name: string;
94
+ events: ColocatedEventDetailsEvent[];
95
+ };
@@ -142,3 +142,4 @@ export declare const _importTickets: (basePath: string, token: string, eventId:
142
142
  export declare const _fetchPublicEventAdvertisement: (basePath: string, eventId: string) => Promise<GenericResponseServerType<PublicAdResponse[]>>;
143
143
  export declare const _activateDataManagers: (basePath: string, token: string, eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
144
144
  export declare const _deactivateDataManagers: (basePath: string, token: string, eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
145
+ export declare const _fetchAccountDocuments: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
@@ -11,7 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports._resendTicketEmail = exports._fetchEventAttendeeActions = exports._fetchPublicEventGroups = exports._fetchEventGroups = exports._unpinExhibition = exports._pinExhibition = exports._unpinDocument = exports._pinDocument = exports._reportExhibitionAction = exports._deleteDocument = exports._updateDocument = exports._createExhibitionDocument = 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._deleteSpeakerRole = exports._updateSpeakerRole = 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
13
  exports._fetchPortfolioEvents = exports._fetchPortfolioDetails = exports._updatePortfolio = exports._createPortfolio = exports._unassignPortfolio = exports._assignPortfolio = exports._deletePortfolio = exports._fetchPortfolios = 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._fetchSpeakerById = exports._fetchSpeakers = exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = exports._fetchEventOrderedTickets = exports._confirmBooking = exports._fetchEventBookings = exports._acceptInternTicket = exports._acceptTicket = exports._postTicketDetails = exports._fetchTicketDetails = exports._assignTicket = exports._fetchAccountBookings = exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = void 0;
14
- exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importTickets = exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadImageToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = exports._fetchBlogPages = void 0;
14
+ exports._fetchAccountDocuments = exports._deactivateDataManagers = exports._activateDataManagers = exports._fetchPublicEventAdvertisement = exports._importTickets = exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadImageToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = exports._fetchBlogPages = void 0;
15
15
  const api_1 = require("../../utils/api");
16
16
  const base_1 = require("../../utils/base");
17
17
  const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -760,3 +760,12 @@ const _deactivateDataManagers = (basePath, token, eventId, attendeeIds) => __awa
760
760
  return ((_h = attendees === null || attendees === void 0 ? void 0 : attendees.data) === null || _h === void 0 ? void 0 : _h.data) || (attendees === null || attendees === void 0 ? void 0 : attendees.data) || attendees;
761
761
  });
762
762
  exports._deactivateDataManagers = _deactivateDataManagers;
763
+ const _fetchAccountDocuments = (basePath, token, accountId, params) => __awaiter(void 0, void 0, void 0, function* () {
764
+ const base = (0, base_1.getBasePath)(basePath);
765
+ const url = params
766
+ ? `${base.ACCOUNTS}/${accountId}/documents?${params}`
767
+ : `${base.ACCOUNTS}/${accountId}/documents`;
768
+ const response = yield (0, api_1.getRequest)(url, token);
769
+ return (response === null || response === void 0 ? void 0 : response.data) || response;
770
+ });
771
+ exports._fetchAccountDocuments = _fetchAccountDocuments;
package/lib/index.js CHANGED
@@ -185,6 +185,10 @@ function EventAPIProvider(props) {
185
185
  (0, api_1.validateConfig)(config);
186
186
  return (0, event_1._fetchAccountBookings)(config.baseUrl, config.token, accountId, params);
187
187
  }), [config, config.baseUrl, config.token]);
188
+ const fetchAccountDocuments = (0, react_1.useCallback)((accountId, params) => __awaiter(this, void 0, void 0, function* () {
189
+ (0, api_1.validateConfig)(config);
190
+ return (0, event_1._fetchAccountDocuments)(config.baseUrl, config.token, accountId, params);
191
+ }), [config, config.baseUrl, config.token]);
188
192
  const resendTicketEmail = react_1.default.useCallback((ticketId) => __awaiter(this, void 0, void 0, function* () {
189
193
  (0, api_1.validateConfig)(config);
190
194
  return (0, event_1._resendTicketEmail)(config.baseUrl, config.token, ticketId);
@@ -961,6 +965,10 @@ function EventAPIProvider(props) {
961
965
  (0, api_1.validateConfig)(config);
962
966
  return (0, authentication_1._fetchColocatedEvents)(config.baseUrl, config.token, accountId);
963
967
  }), [config, config.baseUrl, config.token]);
968
+ const fetchColocatedEventDetails = (0, react_1.useCallback)((accountId, eventId) => __awaiter(this, void 0, void 0, function* () {
969
+ (0, api_1.validateConfig)(config);
970
+ return (0, authentication_1._fetchColocatedEventDetails)(config.baseUrl, config.token, accountId, eventId);
971
+ }), [config, config.baseUrl, config.token]);
964
972
  const createColocatedEvents = (0, react_1.useCallback)((accountId, data) => __awaiter(this, void 0, void 0, function* () {
965
973
  (0, api_1.validateConfig)(config);
966
974
  return (0, authentication_1._createColocatedEvents)(config.baseUrl, config.token, accountId, data);
@@ -1061,6 +1069,7 @@ function EventAPIProvider(props) {
1061
1069
  fetchAccountGroups,
1062
1070
  fetchEventAttendeeActions,
1063
1071
  fetchAccountBookings,
1072
+ fetchAccountDocuments,
1064
1073
  resendBookingEmail,
1065
1074
  resendTicketEmail,
1066
1075
  postTicketDetails,
@@ -1255,6 +1264,7 @@ function EventAPIProvider(props) {
1255
1264
  updatePortfolioBlogPage,
1256
1265
  deletePortfolioBlogPage,
1257
1266
  fetchColocatedEvents,
1267
+ fetchColocatedEventDetails,
1258
1268
  createColocatedEvents,
1259
1269
  editColocatedEvents,
1260
1270
  deleteColocatedEvents,
@@ -1303,6 +1313,7 @@ exports.BaseAPI = {
1303
1313
  fetchAccountGroups: authentication_1._fetchAccountGroups,
1304
1314
  fetchEventAttendeeActions: event_1._fetchEventAttendeeActions,
1305
1315
  fetchAccountBookings: event_1._fetchAccountBookings,
1316
+ fetchAccountDocuments: event_1._fetchAccountDocuments,
1306
1317
  resendTicketEmail: event_1._resendTicketEmail,
1307
1318
  resendBookingEmail: event_1._resendBookingEmail,
1308
1319
  postTicketDetails: event_1._postTicketDetails,
@@ -1499,6 +1510,7 @@ exports.BaseAPI = {
1499
1510
  updatePortfolioBlogPage: event_1._updatePortfolioBlogPage,
1500
1511
  deletePortfolioBlogPage: event_1._deletePortfolioBlogPage,
1501
1512
  fetchColocatedEvents: authentication_1._fetchColocatedEvents,
1513
+ fetchColocatedEventDetails: authentication_1._fetchColocatedEventDetails,
1502
1514
  createColocatedEvents: authentication_1._createColocatedEvents,
1503
1515
  editColocatedEvents: authentication_1._editColocatedEvents,
1504
1516
  deleteColocatedEvents: authentication_1._deleteColocatedEvents,
@@ -1,5 +1,5 @@
1
1
  import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
2
- import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PackageType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType, SessionType } from "../api/authentication/types";
2
+ import { ColocatedEventDetailsResponse, ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PackageType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType, SessionType } from "../api/authentication/types";
3
3
  import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
4
4
  import { Account, AccountDetails, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, GroupType, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
5
5
  import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
@@ -100,6 +100,7 @@ export type BaseAPIType = {
100
100
  fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
101
101
  fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
102
102
  fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
103
+ fetchAccountDocuments: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
103
104
  resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
104
105
  resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
105
106
  postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: any) => Promise<any>;
@@ -321,6 +322,7 @@ export type BaseAPIType = {
321
322
  }[]) => Promise<BlogPage>;
322
323
  deletePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string) => Promise<APIResponse>;
323
324
  fetchColocatedEvents: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
325
+ fetchColocatedEventDetails: (basePath: string, token: string, accountId: string, eventId: string) => Promise<ColocatedEventDetailsResponse>;
324
326
  createColocatedEvents: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
325
327
  editColocatedEvents: (basePath: string, token: string, id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
326
328
  deleteColocatedEvents: (basePath: string, token: string, id: string) => Promise<string>;
@@ -375,6 +377,7 @@ export type EventAPIType = {
375
377
  fetchAccountGroups: (accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
376
378
  fetchEventAttendeeActions: (eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
377
379
  fetchAccountBookings: (accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
380
+ fetchAccountDocuments: (accountId: string, params?: string) => Promise<ResponsePaginationType<DocumentType>>;
378
381
  resendTicketEmail: (ticketId: string) => Promise<any>;
379
382
  resendBookingEmail: (bookingId: string) => Promise<any>;
380
383
  postTicketDetails: (eventId: string, profileId: string, access: string, body: any) => Promise<ResponsePaginationType<BookingDetails>>;
@@ -593,6 +596,7 @@ export type EventAPIType = {
593
596
  }[]) => Promise<BlogPage>;
594
597
  deletePortfolioBlogPage: (portfolioId: string, blogPostId: string) => Promise<APIResponse>;
595
598
  fetchColocatedEvents: (accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
599
+ fetchColocatedEventDetails: (accountId: string, eventId: string) => Promise<ColocatedEventDetailsResponse>;
596
600
  createColocatedEvents: (accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
597
601
  editColocatedEvents: (id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
598
602
  deleteColocatedEvents: (id: string) => Promise<string>;
@@ -611,7 +615,7 @@ export type EventAPIType = {
611
615
  session_types: string;
612
616
  }) => Promise<AccountDetails>;
613
617
  fetchEventsByAccount: (accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
614
- importTickets: (eventId: string, ticketsList: string[]) => Promise<GenericResponseServerType<any[]>>;
618
+ importTickets: (eventId: string, ticketsList: string[]) => Promise<ResponsePaginationType<TicketServerResponse>>;
615
619
  fetchPublicEventAdvertisement: (basePath: string, eventId: string) => Promise<GenericResponseServerType<PublicAdResponse[]>>;
616
620
  fetchColocatedAgenda: (eventId: string) => Promise<SessionFull[]>;
617
621
  activateDataManagers: (eventId: string, attendeeIds: string[]) => Promise<Attendee[]>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10548",
3
+ "version": "1.0.10550",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",