@hubs101/js-api-skd-client 1.0.10379 → 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.
- package/lib/api/event/index.d.ts +5 -1
- package/lib/api/event/index.js +7 -1
- package/lib/api/event/types.d.ts +20 -0
- package/lib/index.js +6 -0
- package/lib/types/base.d.ts +9 -1
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -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, BlogPage, 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>>;
|
|
@@ -111,3 +111,7 @@ export declare const _updatePortfolio: (basePath: string, token: string, portfol
|
|
|
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
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>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -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._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._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* () {
|
|
@@ -611,3 +611,9 @@ const _fetchBlogPages = (basePath, token, portfolioId) => __awaiter(void 0, void
|
|
|
611
611
|
return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
|
|
612
612
|
});
|
|
613
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;
|
package/lib/api/event/types.d.ts
CHANGED
|
@@ -879,6 +879,26 @@ export type BlogPage = {
|
|
|
879
879
|
description: string;
|
|
880
880
|
author: string;
|
|
881
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;
|
|
882
902
|
meta_description: string;
|
|
883
903
|
meta_author: string;
|
|
884
904
|
meta_keywords: string;
|
package/lib/index.js
CHANGED
|
@@ -873,6 +873,10 @@ function EventAPIProvider(props) {
|
|
|
873
873
|
(0, api_1.validateConfig)(config);
|
|
874
874
|
return (0, event_1._fetchBlogPages)(config.baseUrl, config.token, portfolioId);
|
|
875
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]);
|
|
876
880
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
877
881
|
config,
|
|
878
882
|
init,
|
|
@@ -1076,6 +1080,7 @@ function EventAPIProvider(props) {
|
|
|
1076
1080
|
fetchPortfolioDetails,
|
|
1077
1081
|
fetchPortfolioEvents,
|
|
1078
1082
|
fetchBlogPages,
|
|
1083
|
+
createBlogPage,
|
|
1079
1084
|
} }, props.children));
|
|
1080
1085
|
}
|
|
1081
1086
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1280,5 +1285,6 @@ exports.BaseAPI = {
|
|
|
1280
1285
|
fetchPortfolioDetails: event_1._fetchPortfolioDetails,
|
|
1281
1286
|
fetchPortfolioEvents: event_1._fetchPortfolioEvents,
|
|
1282
1287
|
fetchBlogPages: event_1._fetchBlogPages,
|
|
1288
|
+
createBlogPage: event_1._createBlogPage,
|
|
1283
1289
|
};
|
|
1284
1290
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -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, BlogPage, 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,10 @@ 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>;
|
|
295
299
|
fetchBlogPages: (basePath: string, token: string, portfolioId: string) => Promise<BlogPage[]>;
|
|
296
300
|
};
|
|
297
301
|
export type EventAPIType = {
|
|
@@ -514,6 +518,10 @@ export type EventAPIType = {
|
|
|
514
518
|
}[]) => Promise<Portfolio>;
|
|
515
519
|
fetchPortfolioDetails: (portfolioId: string) => Promise<Portfolio>;
|
|
516
520
|
fetchPortfolioEvents: (portfolioId: string) => Promise<Event[]>;
|
|
521
|
+
createBlogPage: (data: BlogPageInput, files: {
|
|
522
|
+
name: string;
|
|
523
|
+
value: File;
|
|
524
|
+
}[]) => Promise<BlogPage>;
|
|
517
525
|
fetchBlogPages: (portfolioId: string) => Promise<BlogPage[]>;
|
|
518
526
|
};
|
|
519
527
|
export type BaseAPIConfigType = {
|