@hubs101/js-api-skd-client 1.0.10413 → 1.0.10415

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 { GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "./types";
2
+ import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "./types";
3
3
  import { GroupType } from "../event/types";
4
4
  import { ResponsePaginationType } from "../public/types";
5
5
  export declare const _login: (basePath: string, email: string, password: string) => Promise<LoginResponse>;
@@ -22,3 +22,7 @@ export declare const _deletePaymentAccount: (basePath: string, token: string, pa
22
22
  export declare const _fetchAccountEvents: (basePath: string, token: string, url: string) => Promise<ResponseAccountEventsType>;
23
23
  export declare const _fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
24
24
  export declare const _createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
25
+ export declare const _fetchColocatedEventsGroups: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
26
+ export declare const _createColocatedEventsGroup: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
27
+ export declare const _editColocatedEventsGroup: (basePath: string, token: string, id: string, data: ColocatedEventsGroupType) => Promise<ColocatedEventsGroupType>;
28
+ export declare const _deleteColocatedEventsGroup: (basePath: string, token: string, id: string) => Promise<Response>;
@@ -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._createAccountGroup = exports._fetchAccountGroups = 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._deleteColocatedEventsGroup = exports._editColocatedEventsGroup = exports._createColocatedEventsGroup = exports._fetchColocatedEventsGroups = exports._createAccountGroup = exports._fetchAccountGroups = 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* () {
@@ -139,3 +139,27 @@ const _createAccountGroup = (basePath, token, accountId, data) => __awaiter(void
139
139
  return (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/groups`, data, token);
140
140
  });
141
141
  exports._createAccountGroup = _createAccountGroup;
142
+ const _fetchColocatedEventsGroups = (basePath, token, accountId) => __awaiter(void 0, void 0, void 0, function* () {
143
+ const base = (0, base_1.getBasePath)(basePath);
144
+ const groups = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/colocated-events`, token);
145
+ return groups;
146
+ });
147
+ exports._fetchColocatedEventsGroups = _fetchColocatedEventsGroups;
148
+ const _createColocatedEventsGroup = (basePath, token, accountId, data) => __awaiter(void 0, void 0, void 0, function* () {
149
+ const base = (0, base_1.getBasePath)(basePath);
150
+ const groups = yield (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/colocated-events`, data, token);
151
+ return groups;
152
+ });
153
+ exports._createColocatedEventsGroup = _createColocatedEventsGroup;
154
+ const _editColocatedEventsGroup = (basePath, token, id, data) => __awaiter(void 0, void 0, void 0, function* () {
155
+ const base = (0, base_1.getBasePath)(basePath);
156
+ const groups = yield (0, api_1.putRequest)(`${base.ACCOUNTS}/colocated-events/${id}`, token, data);
157
+ return groups;
158
+ });
159
+ exports._editColocatedEventsGroup = _editColocatedEventsGroup;
160
+ const _deleteColocatedEventsGroup = (basePath, token, id) => __awaiter(void 0, void 0, void 0, function* () {
161
+ const base = (0, base_1.getBasePath)(basePath);
162
+ const groups = yield (0, api_1.deleteRequestWE)(`${base.ACCOUNTS}/colocated-events/${id}`, token);
163
+ return groups;
164
+ });
165
+ exports._deleteColocatedEventsGroup = _deleteColocatedEventsGroup;
@@ -55,3 +55,12 @@ export type GroupInputType = {
55
55
  style?: string;
56
56
  list?: string;
57
57
  };
58
+ export type ColocatedEventsGroupInputType = {
59
+ name: string;
60
+ events: string[];
61
+ };
62
+ export type ColocatedEventsGroupType = {
63
+ id: string;
64
+ name: string;
65
+ events: string[];
66
+ };
@@ -115,3 +115,8 @@ export declare const _createBlogPage: (basePath: string, token: string, portfoli
115
115
  name: string;
116
116
  value: File;
117
117
  }[]) => Promise<any>;
118
+ export declare const _updatePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string, data: BlogPageInput, files: {
119
+ name: string;
120
+ value: File;
121
+ }[]) => Promise<any>;
122
+ export declare const _deletePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string) => Promise<any>;
@@ -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._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = exports._resendTicketEmail = exports._fetchEventAttendeeActions = 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._createBlogPage = exports._fetchBlogPages = 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._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 = void 0;
13
+ exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = exports._fetchBlogPages = 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._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 = 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* () {
@@ -619,3 +619,15 @@ const _createBlogPage = (basePath, token, portfolioId, data, files) => __awaiter
619
619
  return response;
620
620
  });
621
621
  exports._createBlogPage = _createBlogPage;
622
+ const _updatePortfolioBlogPage = (basePath, token, portfolioId, blogPostId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
623
+ const base = (0, base_1.getBasePath)(basePath);
624
+ const response = yield (0, api_1.postFilesAndDataRequest)(`${base.PORTFOLIOS}/${portfolioId}/pages/${blogPostId}`, data, files, token, "put");
625
+ return response;
626
+ });
627
+ exports._updatePortfolioBlogPage = _updatePortfolioBlogPage;
628
+ const _deletePortfolioBlogPage = (basePath, token, portfolioId, blogPostId) => __awaiter(void 0, void 0, void 0, function* () {
629
+ const base = (0, base_1.getBasePath)(basePath);
630
+ const response = yield (0, api_1.deleteRequestWE)(`${base.PORTFOLIOS}/${portfolioId}/pages/${blogPostId}`, token);
631
+ return response;
632
+ });
633
+ exports._deletePortfolioBlogPage = _deletePortfolioBlogPage;
package/lib/index.js CHANGED
@@ -889,6 +889,30 @@ function EventAPIProvider(props) {
889
889
  (0, api_1.validateConfig)(config);
890
890
  return (0, event_1._createBlogPage)(config.baseUrl, config.token, portfolioId, data, files);
891
891
  }), [config, config.baseUrl, config.token]);
892
+ const updatePortfolioBlogPage = react_1.default.useCallback((portfolioId, blogPostId, data, files) => __awaiter(this, void 0, void 0, function* () {
893
+ (0, api_1.validateConfig)(config);
894
+ return (0, event_1._updatePortfolioBlogPage)(config.baseUrl, config.token, portfolioId, blogPostId, data, files);
895
+ }), [config, config.baseUrl, config.token]);
896
+ const deletePortfolioBlogPage = react_1.default.useCallback((portfolioId, blogPostId) => __awaiter(this, void 0, void 0, function* () {
897
+ (0, api_1.validateConfig)(config);
898
+ return (0, event_1._deletePortfolioBlogPage)(config.baseUrl, config.token, portfolioId, blogPostId);
899
+ }), [config, config.baseUrl, config.token]);
900
+ const fetchColocatedEventsGroups = (0, react_1.useCallback)((accountId) => __awaiter(this, void 0, void 0, function* () {
901
+ (0, api_1.validateConfig)(config);
902
+ return (0, authentication_1._fetchColocatedEventsGroups)(config.baseUrl, config.token, accountId);
903
+ }), [config, config.baseUrl, config.token]);
904
+ const createColocatedEventsGroup = (0, react_1.useCallback)((accountId, data) => __awaiter(this, void 0, void 0, function* () {
905
+ (0, api_1.validateConfig)(config);
906
+ return (0, authentication_1._createColocatedEventsGroup)(config.baseUrl, config.token, accountId, data);
907
+ }), [config, config.baseUrl, config.token]);
908
+ const editColocatedEventsGroup = (0, react_1.useCallback)((id, data) => __awaiter(this, void 0, void 0, function* () {
909
+ (0, api_1.validateConfig)(config);
910
+ return (0, authentication_1._editColocatedEventsGroup)(config.baseUrl, config.token, id, data);
911
+ }), [config, config.baseUrl, config.token]);
912
+ const deleteColocatedEventsGroup = (0, react_1.useCallback)((id) => __awaiter(this, void 0, void 0, function* () {
913
+ (0, api_1.validateConfig)(config);
914
+ return (0, authentication_1._deleteColocatedEventsGroup)(config.baseUrl, config.token, id);
915
+ }), [config, config.baseUrl, config.token]);
892
916
  return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
893
917
  config,
894
918
  init,
@@ -1096,6 +1120,12 @@ function EventAPIProvider(props) {
1096
1120
  createBlogPage,
1097
1121
  createAccountGroup,
1098
1122
  getPublicGroupDetails,
1123
+ updatePortfolioBlogPage,
1124
+ deletePortfolioBlogPage,
1125
+ fetchColocatedEventsGroups,
1126
+ createColocatedEventsGroup,
1127
+ editColocatedEventsGroup,
1128
+ deleteColocatedEventsGroup,
1099
1129
  } }, props.children));
1100
1130
  }
1101
1131
  exports.EventAPIProvider = EventAPIProvider;
@@ -1304,5 +1334,11 @@ exports.BaseAPI = {
1304
1334
  createBlogPage: event_1._createBlogPage,
1305
1335
  createAccountGroup: authentication_1._createAccountGroup,
1306
1336
  getPublicGroupDetails: public_1._getPublicGroupDetails,
1337
+ updatePortfolioBlogPage: event_1._updatePortfolioBlogPage,
1338
+ deletePortfolioBlogPage: event_1._deletePortfolioBlogPage,
1339
+ fetchColocatedEventsGroups: authentication_1._fetchColocatedEventsGroups,
1340
+ createColocatedEventsGroup: authentication_1._createColocatedEventsGroup,
1341
+ editColocatedEventsGroup: authentication_1._editColocatedEventsGroup,
1342
+ deleteColocatedEventsGroup: authentication_1._deleteColocatedEventsGroup,
1307
1343
  };
1308
1344
  exports.useAPIContext = EventAPIContext_1.useAPIContext;
@@ -1,5 +1,5 @@
1
1
  import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
2
- import { GroupInputType, GroupResponseType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
2
+ import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
3
3
  import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
4
4
  import { Account, AccountInput, Answer, BlogPage, BlogPageInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, GroupType, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
5
5
  import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
@@ -301,6 +301,15 @@ export type BaseAPIType = {
301
301
  fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
302
302
  createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
303
303
  getPublicGroupDetails: <T>(basePath: string, groupId: string) => Promise<PublicGroupResponseType<T>>;
304
+ updatePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string, data: BlogPageInput, files: {
305
+ name: string;
306
+ value: File;
307
+ }[]) => Promise<BlogPage>;
308
+ deletePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string) => Promise<Response>;
309
+ fetchColocatedEventsGroups: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
310
+ createColocatedEventsGroup: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
311
+ editColocatedEventsGroup: (basePath: string, token: string, id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
312
+ deleteColocatedEventsGroup: (basePath: string, token: string, id: string) => Promise<Response>;
304
313
  };
305
314
  export type EventAPIType = {
306
315
  config: BaseAPIConfigType;
@@ -530,6 +539,15 @@ export type EventAPIType = {
530
539
  fetchBlogPages: (accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
531
540
  createAccountGroup: (accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
532
541
  getPublicGroupDetails: <T>(groupId: string) => Promise<PublicGroupResponseType<T>>;
542
+ updatePortfolioBlogPage: (portfolioId: string, blogPostId: string, data: BlogPageInput, files: {
543
+ name: string;
544
+ value: File;
545
+ }[]) => Promise<BlogPage>;
546
+ deletePortfolioBlogPage: (portfolioId: string, blogPostId: string) => Promise<Response>;
547
+ fetchColocatedEventsGroups: (accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
548
+ createColocatedEventsGroup: (accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
549
+ editColocatedEventsGroup: (id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
550
+ deleteColocatedEventsGroup: (id: string) => Promise<Response>;
533
551
  };
534
552
  export type BaseAPIConfigType = {
535
553
  baseUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10413",
3
+ "version": "1.0.10415",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",