@hubs101/js-api-skd-client 1.0.10378 → 1.0.10380

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,7 +1,7 @@
1
1
  import { Page } from "../pages/types";
2
2
  import { GenericResponseServerType, ResponsePaginationType, ResponseServerType } from "../public/types";
3
3
  import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../types";
4
- import { Account, AccountInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
4
+ import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
5
5
  export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
6
6
  export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
7
7
  export declare const _fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
@@ -110,3 +110,8 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
110
110
  }[]) => Promise<any>;
111
111
  export declare const _fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
112
112
  export declare const _fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
113
+ export declare const _fetchBlogPages: (basePath: string, token: string, portfolioId: string) => Promise<BlogPage[]>;
114
+ export declare const _createBlogPage: (basePath: string, token: string, portfolioId: string, data: BlogPageInput, files: {
115
+ name: string;
116
+ value: File;
117
+ }[]) => 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._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._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* () {
@@ -605,3 +605,15 @@ const _fetchPortfolioEvents = (basePath, token, portfolioId) => __awaiter(void 0
605
605
  return (portfolioEvents === null || portfolioEvents === void 0 ? void 0 : portfolioEvents.data) || portfolioEvents;
606
606
  });
607
607
  exports._fetchPortfolioEvents = _fetchPortfolioEvents;
608
+ const _fetchBlogPages = (basePath, token, portfolioId) => __awaiter(void 0, void 0, void 0, function* () {
609
+ const base = (0, base_1.getBasePath)(basePath);
610
+ const { data: portfolioPages } = yield (0, api_1.getRequest)(`${base.PORTFOLIOS}/${portfolioId}/pages`, token);
611
+ return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
612
+ });
613
+ exports._fetchBlogPages = _fetchBlogPages;
614
+ const _createBlogPage = (basePath, token, portfolioId, data, files) => __awaiter(void 0, void 0, void 0, function* () {
615
+ const base = (0, base_1.getBasePath)(basePath);
616
+ const response = yield (0, api_1.postFilesAndDataRequest)(`${base.PORTFOLIOS}/${portfolioId}/pages`, data, files, token);
617
+ return response;
618
+ });
619
+ exports._createBlogPage = _createBlogPage;
@@ -858,4 +858,49 @@ export type PortfolioInput = {
858
858
  design_portfolio_video_url?: string;
859
859
  design_portfolio_video_image?: string;
860
860
  };
861
+ export type BlogPage = {
862
+ id: string;
863
+ headline: string;
864
+ subHeadline: string;
865
+ slug: string;
866
+ contentHtml: string;
867
+ contentText: string;
868
+ language: string;
869
+ createdAt: string;
870
+ updatedAt: string;
871
+ published: boolean;
872
+ design: {
873
+ primaryColor: string;
874
+ secondaryColor: string;
875
+ backgroundColor: string;
876
+ featureImage: string;
877
+ coverImage: string;
878
+ };
879
+ description: string;
880
+ author: string;
881
+ keywords: string;
882
+ meta: {
883
+ description: string;
884
+ author: string;
885
+ keywords: string;
886
+ };
887
+ };
888
+ export type BlogPageInput = {
889
+ id: string;
890
+ headline: string;
891
+ sub_headline: string;
892
+ slug: string;
893
+ content_html: string;
894
+ content_structure: string;
895
+ language: string;
896
+ published: boolean;
897
+ design_primary_color: string;
898
+ design_secondary_color: string;
899
+ design_background_color: string;
900
+ design_feature_image: string;
901
+ design_cover_image: string;
902
+ meta_description: string;
903
+ meta_author: string;
904
+ meta_keywords: string;
905
+ };
861
906
  export {};
package/lib/index.js CHANGED
@@ -869,6 +869,14 @@ function EventAPIProvider(props) {
869
869
  (0, api_1.validateConfig)(config);
870
870
  return (0, event_1._fetchPortfolioEvents)(config.baseUrl, config.token, portfolioId);
871
871
  }), [config, config.baseUrl, config.token]);
872
+ const fetchBlogPages = react_1.default.useCallback((portfolioId) => __awaiter(this, void 0, void 0, function* () {
873
+ (0, api_1.validateConfig)(config);
874
+ return (0, event_1._fetchBlogPages)(config.baseUrl, config.token, portfolioId);
875
+ }), [config, config.baseUrl, config.token]);
876
+ const createBlogPage = react_1.default.useCallback((portfolioId, data, files) => __awaiter(this, void 0, void 0, function* () {
877
+ (0, api_1.validateConfig)(config);
878
+ return (0, event_1._createBlogPage)(portfolioId, config.baseUrl, config.token, data, files);
879
+ }), [config, config.baseUrl, config.token]);
872
880
  return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
873
881
  config,
874
882
  init,
@@ -1071,6 +1079,8 @@ function EventAPIProvider(props) {
1071
1079
  updatePortfolio,
1072
1080
  fetchPortfolioDetails,
1073
1081
  fetchPortfolioEvents,
1082
+ fetchBlogPages,
1083
+ createBlogPage,
1074
1084
  } }, props.children));
1075
1085
  }
1076
1086
  exports.EventAPIProvider = EventAPIProvider;
@@ -1274,5 +1284,7 @@ exports.BaseAPI = {
1274
1284
  updatePortfolio: event_1._updatePortfolio,
1275
1285
  fetchPortfolioDetails: event_1._fetchPortfolioDetails,
1276
1286
  fetchPortfolioEvents: event_1._fetchPortfolioEvents,
1287
+ fetchBlogPages: event_1._fetchBlogPages,
1288
+ createBlogPage: event_1._createBlogPage,
1277
1289
  };
1278
1290
  exports.useAPIContext = EventAPIContext_1.useAPIContext;
@@ -2,7 +2,7 @@ import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNo
2
2
  import { RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
3
3
  import { CalendarEvent } from "../api/calendar/types";
4
4
  import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
5
- import { Account, AccountInput, Answer, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
5
+ import { Account, AccountInput, Answer, BlogPage, BlogPageInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
6
6
  import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
7
7
  import { Page } from "../api/pages/types";
8
8
  import { CommentBody, Post, PostBody, UpdatePostBody } from "../api/posts/types";
@@ -292,6 +292,11 @@ export type BaseAPIType = {
292
292
  }[]) => Promise<Portfolio>;
293
293
  fetchPortfolioDetails: (basePath: string, token: string, portfolioId: string) => Promise<Portfolio>;
294
294
  fetchPortfolioEvents: (basePath: string, token: string, portfolioId: string) => Promise<Event[]>;
295
+ createBlogPage: (basePath: string, token: string, portfolioId: string, data: BlogPageInput, files: {
296
+ name: string;
297
+ value: File;
298
+ }[]) => Promise<BlogPage>;
299
+ fetchBlogPages: (basePath: string, token: string, portfolioId: string) => Promise<BlogPage[]>;
295
300
  };
296
301
  export type EventAPIType = {
297
302
  config: BaseAPIConfigType;
@@ -513,6 +518,11 @@ export type EventAPIType = {
513
518
  }[]) => Promise<Portfolio>;
514
519
  fetchPortfolioDetails: (portfolioId: string) => Promise<Portfolio>;
515
520
  fetchPortfolioEvents: (portfolioId: string) => Promise<Event[]>;
521
+ createBlogPage: (data: BlogPageInput, files: {
522
+ name: string;
523
+ value: File;
524
+ }[]) => Promise<BlogPage>;
525
+ fetchBlogPages: (portfolioId: string) => Promise<BlogPage[]>;
516
526
  };
517
527
  export type BaseAPIConfigType = {
518
528
  baseUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10378",
3
+ "version": "1.0.10380",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",