@hubs101/js-api-skd-client 1.0.10463 → 1.0.10464
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 +1 -0
- package/lib/api/event/index.js +7 -1
- package/lib/index.js +6 -0
- package/lib/types/base.d.ts +2 -0
- package/package.json +1 -1
package/lib/api/event/index.d.ts
CHANGED
|
@@ -126,3 +126,4 @@ export declare const _fetchMediaDirectoryFiles: (basePath: string, token: string
|
|
|
126
126
|
export declare const _fetchMediaFileDetails: (basePath: string, token: string, accountId: string, filepath: string) => Promise<FileDetails>;
|
|
127
127
|
export declare const _deleteMediaDirectories: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
128
128
|
export declare const _deleteMediaDirectoryFiles: (basePath: string, token: string, accountId: string, filepath: string) => Promise<APIResponse>;
|
|
129
|
+
export declare const _addMediaFolder: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -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._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._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = void 0;
|
|
14
|
+
exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = 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* () {
|
|
@@ -662,3 +662,9 @@ const _deleteMediaDirectoryFiles = (basePath, token, accountId, filepath) => __a
|
|
|
662
662
|
return response;
|
|
663
663
|
});
|
|
664
664
|
exports._deleteMediaDirectoryFiles = _deleteMediaDirectoryFiles;
|
|
665
|
+
const _addMediaFolder = (basePath, token, accountId, path, name) => __awaiter(void 0, void 0, void 0, function* () {
|
|
666
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
667
|
+
const response = yield (0, api_1.postRequestWE)(`${base.ACCOUNTS}/media/${accountId}/directory`, { path, name }, token);
|
|
668
|
+
return response;
|
|
669
|
+
});
|
|
670
|
+
exports._addMediaFolder = _addMediaFolder;
|
package/lib/index.js
CHANGED
|
@@ -145,6 +145,10 @@ function EventAPIProvider(props) {
|
|
|
145
145
|
(0, api_1.validateConfig)(config);
|
|
146
146
|
return (0, event_1._deleteMediaDirectories)(config.baseUrl, config.token, accountId, path, name);
|
|
147
147
|
}), [config, config.baseUrl, config.token]);
|
|
148
|
+
const addMediaFolder = (0, react_1.useCallback)((accountId, path, name) => __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
(0, api_1.validateConfig)(config);
|
|
150
|
+
return (0, event_1._addMediaFolder)(config.baseUrl, config.token, accountId, path, name);
|
|
151
|
+
}), [config, config.baseUrl, config.token]);
|
|
148
152
|
const deleteMediaDirectoryFiles = (0, react_1.useCallback)((accountId, filepath) => __awaiter(this, void 0, void 0, function* () {
|
|
149
153
|
(0, api_1.validateConfig)(config);
|
|
150
154
|
return (0, event_1._deleteMediaDirectoryFiles)(config.baseUrl, config.token, accountId, filepath);
|
|
@@ -961,6 +965,7 @@ function EventAPIProvider(props) {
|
|
|
961
965
|
unpinExhibition,
|
|
962
966
|
fetchEventGroups,
|
|
963
967
|
deleteMediaDirectories,
|
|
968
|
+
addMediaFolder,
|
|
964
969
|
deleteMediaDirectoryFiles,
|
|
965
970
|
updateAccountGroup,
|
|
966
971
|
updateVisibilityAttendee,
|
|
@@ -1180,6 +1185,7 @@ exports.BaseAPI = {
|
|
|
1180
1185
|
unpinExhibition: event_1._unpinExhibition,
|
|
1181
1186
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
1182
1187
|
deleteMediaDirectories: event_1._deleteMediaDirectories,
|
|
1188
|
+
addMediaFolder: event_1._addMediaFolder,
|
|
1183
1189
|
deleteMediaDirectoryFiles: event_1._deleteMediaDirectoryFiles,
|
|
1184
1190
|
updateAccountGroup: authentication_1._updateAccountGroup,
|
|
1185
1191
|
updateVisibilityAttendee: attendee_1._updateVisibilityAttendee,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export type BaseAPIType = {
|
|
|
90
90
|
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
91
91
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
92
92
|
deleteMediaDirectories: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
93
|
+
addMediaFolder: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
93
94
|
deleteMediaDirectoryFiles: (basePath: string, token: string, accountId: string, filepath: string) => Promise<APIResponse>;
|
|
94
95
|
updateAccountGroup: (basePath: string, token: string, accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
|
|
95
96
|
fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
|
|
@@ -338,6 +339,7 @@ export type EventAPIType = {
|
|
|
338
339
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
339
340
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
340
341
|
deleteMediaDirectories: (accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
342
|
+
addMediaFolder: (accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
341
343
|
deleteMediaDirectoryFiles: (accountId: string, filepath: string) => Promise<APIResponse>;
|
|
342
344
|
updateAccountGroup: (accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
|
|
343
345
|
fetchAccountGroups: (accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
|