@hubs101/js-api-skd-client 1.0.10441 → 1.0.10443

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,6 +1,6 @@
1
1
  import { GenericResponseServerType, ResponsePaginationType, ResponseServerType } from "../public/types";
2
2
  import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../types";
3
- import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
3
+ import { Account, AccountInput, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DirectoryFiles, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, FileDetails, GroupServerResponse, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
4
4
  import { Page } from "../pages/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[]>;
@@ -121,3 +121,5 @@ export declare const _updatePortfolioBlogPage: (basePath: string, token: string,
121
121
  }[]) => Promise<any>;
122
122
  export declare const _deletePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string) => Promise<any>;
123
123
  export declare const _fetchMediaDirectories: (basePath: string, token: string, accountId: string, path: string) => Promise<Directory>;
124
+ export declare const _fetchMediaDirectoryFiles: (basePath: string, token: string, accountId: string, path: string) => Promise<DirectoryFiles>;
125
+ export declare const _fetchMediaFileDetails: (basePath: string, token: string, accountId: string, filepath: string) => Promise<FileDetails>;
@@ -11,6 +11,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
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
13
  exports._fetchMediaDirectories = 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
+ exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = void 0;
14
15
  const api_1 = require("../../utils/api");
15
16
  const base_1 = require("../../utils/base");
16
17
  const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -637,3 +638,15 @@ const _fetchMediaDirectories = (basePath, token, accountId, path) => __awaiter(v
637
638
  return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
638
639
  });
639
640
  exports._fetchMediaDirectories = _fetchMediaDirectories;
641
+ const _fetchMediaDirectoryFiles = (basePath, token, accountId, path) => __awaiter(void 0, void 0, void 0, function* () {
642
+ const base = (0, base_1.getBasePath)(basePath);
643
+ const { data: portfolioPages } = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/media/${accountId}/files?path=${path}`, token);
644
+ return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
645
+ });
646
+ exports._fetchMediaDirectoryFiles = _fetchMediaDirectoryFiles;
647
+ const _fetchMediaFileDetails = (basePath, token, accountId, filepath) => __awaiter(void 0, void 0, void 0, function* () {
648
+ const base = (0, base_1.getBasePath)(basePath);
649
+ const { data: portfolioPages } = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/media/${accountId}/filedetails?filepath=${filepath}`, token);
650
+ return (portfolioPages === null || portfolioPages === void 0 ? void 0 : portfolioPages.data) || portfolioPages;
651
+ });
652
+ exports._fetchMediaFileDetails = _fetchMediaFileDetails;
@@ -918,4 +918,13 @@ export type Directory = {
918
918
  path: string;
919
919
  directories: string[];
920
920
  };
921
+ export type DirectoryFiles = {
922
+ path: string;
923
+ files: string[];
924
+ };
925
+ export type FileDetails = {
926
+ source: string;
927
+ updated_at: string;
928
+ size: number;
929
+ };
921
930
  export {};
@@ -24,15 +24,15 @@ export interface PageSetting {
24
24
  }
25
25
  export type PageInput = {
26
26
  name: string;
27
+ language: string[];
27
28
  type?: string;
28
29
  content_html?: string;
29
- content_text?: string;
30
- language: string[];
31
30
  documents?: string;
32
31
  content_structure?: string;
33
32
  event?: string;
34
33
  dynamic?: boolean;
35
34
  tags?: string[];
36
35
  setting?: PageSetting;
36
+ content_text?: string;
37
37
  published?: boolean;
38
38
  };
package/lib/index.js CHANGED
@@ -925,6 +925,14 @@ function EventAPIProvider(props) {
925
925
  (0, api_1.validateConfig)(config);
926
926
  return (0, event_1._fetchMediaDirectories)(config.baseUrl, config.token, accountId, path);
927
927
  }), [config, config.baseUrl, config.token]);
928
+ const fetchMediaDirectoryFiles = react_1.default.useCallback((accountId, filepath) => __awaiter(this, void 0, void 0, function* () {
929
+ (0, api_1.validateConfig)(config);
930
+ return (0, event_1._fetchMediaDirectoryFiles)(config.baseUrl, config.token, accountId, filepath);
931
+ }), [config, config.baseUrl, config.token]);
932
+ const fetchMediaFileDetails = react_1.default.useCallback((accountId, path) => __awaiter(this, void 0, void 0, function* () {
933
+ (0, api_1.validateConfig)(config);
934
+ return (0, event_1._fetchMediaFileDetails)(config.baseUrl, config.token, accountId, path);
935
+ }), [config, config.baseUrl, config.token]);
928
936
  return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
929
937
  config,
930
938
  init,
@@ -1141,6 +1149,8 @@ function EventAPIProvider(props) {
1141
1149
  editColocatedEvents,
1142
1150
  deleteColocatedEvents,
1143
1151
  fetchMediaDirectories,
1152
+ fetchMediaDirectoryFiles,
1153
+ fetchMediaFileDetails,
1144
1154
  } }, props.children));
1145
1155
  }
1146
1156
  exports.EventAPIProvider = EventAPIProvider;
@@ -1358,5 +1368,7 @@ exports.BaseAPI = {
1358
1368
  editColocatedEvents: authentication_1._editColocatedEvents,
1359
1369
  deleteColocatedEvents: authentication_1._deleteColocatedEvents,
1360
1370
  fetchMediaDirectories: event_1._fetchMediaDirectories,
1371
+ fetchMediaDirectoryFiles: event_1._fetchMediaDirectoryFiles,
1372
+ fetchMediaFileDetails: event_1._fetchMediaFileDetails,
1361
1373
  };
1362
1374
  exports.useAPIContext = EventAPIContext_1.useAPIContext;
@@ -1,7 +1,7 @@
1
1
  import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
2
2
  import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
3
3
  import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
4
- import { Account, AccountInput, Answer, BlogPage, BlogPageInput, Booking, BookingDetails, Directory, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, GroupType, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
4
+ import { Account, AccountInput, Answer, 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";
6
6
  import { CommentBody, Post, PostBody, UpdatePostBody } from "../api/posts/types";
7
7
  import { GenericResponseServerType, PublicEventItem, ResponsePaginationType, ResponseServerType } from "../api/public/types";
@@ -313,6 +313,8 @@ export type BaseAPIType = {
313
313
  deleteColocatedEvents: (basePath: string, token: string, id: string) => Promise<string>;
314
314
  updateVisibilityAttendee: (basePath: string, token: string, attendeeId: string, visibility: string) => Promise<SuccessResponse>;
315
315
  fetchMediaDirectories: (basePath: string, token: string, accountId: string, path: string) => Promise<Directory>;
316
+ fetchMediaDirectoryFiles: (basePath: string, token: string, accountId: string, path: string) => Promise<DirectoryFiles>;
317
+ fetchMediaFileDetails: (basePath: string, token: string, accountId: string, filepath: string) => Promise<FileDetails>;
316
318
  };
317
319
  export type EventAPIType = {
318
320
  config: BaseAPIConfigType;
@@ -554,6 +556,8 @@ export type EventAPIType = {
554
556
  deleteColocatedEvents: (id: string) => Promise<string>;
555
557
  updateVisibilityAttendee: (attendeeId: string, visibility: string) => Promise<SuccessResponse>;
556
558
  fetchMediaDirectories: (accountId: string, path: string) => Promise<Directory>;
559
+ fetchMediaDirectoryFiles: (accountId: string, path: string) => Promise<DirectoryFiles>;
560
+ fetchMediaFileDetails: (accountId: string, filepath: string) => Promise<FileDetails>;
557
561
  };
558
562
  export type BaseAPIConfigType = {
559
563
  baseUrl?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10441",
3
+ "version": "1.0.10443",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",