@hubs101/js-api-skd-client 1.0.10534 → 1.0.10536
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/attendee/index.js +1 -1
- package/lib/api/event/index.d.ts +2 -0
- package/lib/api/event/index.js +18 -3
- package/lib/api/event/types.d.ts +1 -0
- package/lib/index.js +12 -0
- package/lib/types/base.d.ts +4 -0
- package/lib/utils/api.d.ts +1 -0
- package/lib/utils/api.js +3 -1
- package/package.json +1 -1
|
@@ -129,7 +129,7 @@ const _checkout = (basePath, token, attendeeId) => __awaiter(void 0, void 0, voi
|
|
|
129
129
|
exports._checkout = _checkout;
|
|
130
130
|
const _sendAttendeeOnboardingAnswers = (basePath, token, attendeeId, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
131
131
|
const base = (0, base_1.getBasePath)(basePath);
|
|
132
|
-
const response = yield (0, api_1.
|
|
132
|
+
const response = yield (0, api_1.patchRequestWe)(`${base.ATTENDEES}/${attendeeId}/onboarding`, body, token);
|
|
133
133
|
return response;
|
|
134
134
|
});
|
|
135
135
|
exports._sendAttendeeOnboardingAnswers = _sendAttendeeOnboardingAnswers;
|
package/lib/api/event/index.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare const _unpinDocument: (basePath: string, token: string, eventId:
|
|
|
50
50
|
export declare const _pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
51
51
|
export declare const _unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
52
52
|
export declare const _fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
53
|
+
export declare const _fetchPublicEventGroups: (basePath: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
53
54
|
export declare const _fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
|
|
54
55
|
export declare const _resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
|
|
55
56
|
export declare const _resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
|
|
@@ -135,3 +136,4 @@ export declare const _addMediaFolder: (basePath: string, token: string, accountI
|
|
|
135
136
|
export declare const _updateEventWebsite: (basePath: string, token: string, eventId: string, keyData: string, data: {
|
|
136
137
|
website_content: Record<string, string | boolean | File>[];
|
|
137
138
|
}, files?: any) => Promise<EventServerResponse>;
|
|
139
|
+
export declare const _importTickets: (basePath: string, token: string, eventId: string, ticketsList: string[]) => Promise<ResponsePaginationType<TicketServerResponse>>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -9,9 +9,9 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadImageToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = void 0;
|
|
12
|
+
exports._resendTicketEmail = exports._fetchEventAttendeeActions = exports._fetchPublicEventGroups = exports._fetchEventGroups = exports._unpinExhibition = exports._pinExhibition = exports._unpinDocument = exports._pinDocument = exports._reportExhibitionAction = exports._deleteDocument = exports._updateDocument = exports._createExhibitionDocument = 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._deleteSpeakerRole = exports._updateSpeakerRole = 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 = exports._fetchMyBookings = exports._createBooking = exports._checkBooking = exports._resendBookingEmail = void 0;
|
|
14
|
+
exports._importTickets = exports._updateEventWebsite = exports._addMediaFolder = exports._deleteMediaDirectoryFiles = exports._deleteMediaDirectories = exports._renameFolder = exports._uploadImageToFolder = exports._fetchMediaFileDetails = exports._fetchMediaDirectoryFiles = exports._fetchMediaDirectories = exports._deletePortfolioBlogPage = exports._updatePortfolioBlogPage = exports._createBlogPage = 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* () {
|
|
@@ -312,6 +312,12 @@ const _fetchEventGroups = (basePath, token, eventId) => __awaiter(void 0, void 0
|
|
|
312
312
|
return groups;
|
|
313
313
|
});
|
|
314
314
|
exports._fetchEventGroups = _fetchEventGroups;
|
|
315
|
+
const _fetchPublicEventGroups = (basePath, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
316
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
317
|
+
const { data: groups } = yield (0, api_1.getRequest)(`${base.PUBLIC_EVENTS}/${eventId}/groups`);
|
|
318
|
+
return groups;
|
|
319
|
+
});
|
|
320
|
+
exports._fetchPublicEventGroups = _fetchPublicEventGroups;
|
|
315
321
|
const _fetchEventAttendeeActions = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
316
322
|
const base = (0, base_1.getBasePath)(basePath);
|
|
317
323
|
const response = yield (0, api_1.getRequest)(`${base.ACTIONS_EVENTS}/${eventId}`, token);
|
|
@@ -717,3 +723,12 @@ const _updateEventWebsite = (basePath, token, eventId, keyData, data, files) =>
|
|
|
717
723
|
return response === null || response === void 0 ? void 0 : response.data;
|
|
718
724
|
});
|
|
719
725
|
exports._updateEventWebsite = _updateEventWebsite;
|
|
726
|
+
const _importTickets = (basePath, token, eventId, ticketsList) => __awaiter(void 0, void 0, void 0, function* () {
|
|
727
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
728
|
+
const ticketListString = ticketsList.join(",");
|
|
729
|
+
const response = yield (0, api_1.postRequest)(`${base.EVENTS}/${eventId}/import/tickets`, {
|
|
730
|
+
tickets_list: ticketListString,
|
|
731
|
+
}, token);
|
|
732
|
+
return response;
|
|
733
|
+
});
|
|
734
|
+
exports._importTickets = _importTickets;
|
package/lib/api/event/types.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -152,6 +152,10 @@ function EventAPIProvider(props) {
|
|
|
152
152
|
(0, api_1.validateConfig)(config);
|
|
153
153
|
return (0, event_1._fetchEventGroups)(config.baseUrl, config.token, eventId);
|
|
154
154
|
}), [config, config.baseUrl, config.token]);
|
|
155
|
+
const fetchPublicEventGroups = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
+
(0, api_1.validateConfig)(config);
|
|
157
|
+
return (0, event_1._fetchPublicEventGroups)(config.baseUrl, eventId);
|
|
158
|
+
}), [config, config.baseUrl, config.token]);
|
|
155
159
|
const deleteMediaDirectories = (0, react_1.useCallback)((accountId, path, name) => __awaiter(this, void 0, void 0, function* () {
|
|
156
160
|
(0, api_1.validateConfig)(config);
|
|
157
161
|
return (0, event_1._deleteMediaDirectories)(config.baseUrl, config.token, accountId, path, name);
|
|
@@ -1000,6 +1004,10 @@ function EventAPIProvider(props) {
|
|
|
1000
1004
|
(0, api_1.validateConfig)(config);
|
|
1001
1005
|
return (0, authentication_1._updatePackages)(config.baseUrl, config.token, accountId, data);
|
|
1002
1006
|
}), [config, config.baseUrl, config.token]);
|
|
1007
|
+
const importTickets = (0, react_1.useCallback)((eventId, ticketsList) => __awaiter(this, void 0, void 0, function* () {
|
|
1008
|
+
(0, api_1.validateConfig)(config);
|
|
1009
|
+
return (0, event_1._importTickets)(config.baseUrl, config.token, eventId, ticketsList);
|
|
1010
|
+
}), [config, config.baseUrl, config.token]);
|
|
1003
1011
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
1004
1012
|
config,
|
|
1005
1013
|
init,
|
|
@@ -1019,6 +1027,7 @@ function EventAPIProvider(props) {
|
|
|
1019
1027
|
pinExhibition,
|
|
1020
1028
|
unpinExhibition,
|
|
1021
1029
|
fetchEventGroups,
|
|
1030
|
+
fetchPublicEventGroups,
|
|
1022
1031
|
deleteMediaDirectories,
|
|
1023
1032
|
addMediaFolder,
|
|
1024
1033
|
updateEventWebsite,
|
|
@@ -1232,6 +1241,7 @@ function EventAPIProvider(props) {
|
|
|
1232
1241
|
updateAttendeeImageNative,
|
|
1233
1242
|
updateGlobalAttendeeImageNative,
|
|
1234
1243
|
fetchEventsByAccount,
|
|
1244
|
+
importTickets
|
|
1235
1245
|
} }, props.children));
|
|
1236
1246
|
}
|
|
1237
1247
|
exports.BaseAPI = {
|
|
@@ -1249,6 +1259,7 @@ exports.BaseAPI = {
|
|
|
1249
1259
|
pinExhibition: event_1._pinExhibition,
|
|
1250
1260
|
unpinExhibition: event_1._unpinExhibition,
|
|
1251
1261
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
1262
|
+
fetchPublicEventGroups: event_1._fetchPublicEventGroups,
|
|
1252
1263
|
deleteMediaDirectories: event_1._deleteMediaDirectories,
|
|
1253
1264
|
addMediaFolder: event_1._addMediaFolder,
|
|
1254
1265
|
updateEventWebsite: event_1._updateEventWebsite,
|
|
@@ -1464,5 +1475,6 @@ exports.BaseAPI = {
|
|
|
1464
1475
|
updateAttendeeImageNative: attendee_1._updateAttendeeImageNative,
|
|
1465
1476
|
updateGlobalAttendeeImageNative: attendee_1._updateGlobalAttendeeImageNative,
|
|
1466
1477
|
fetchEventsByAccount: authentication_1._fetchEventsByAccount,
|
|
1478
|
+
importTickets: event_1._importTickets
|
|
1467
1479
|
};
|
|
1468
1480
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -89,6 +89,7 @@ export type BaseAPIType = {
|
|
|
89
89
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
90
90
|
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
91
91
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
92
|
+
fetchPublicEventGroups: (basePath: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
92
93
|
deleteMediaDirectories: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
93
94
|
addMediaFolder: (basePath: string, token: string, accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
94
95
|
updateEventWebsite: (basePath: string, token: string, eventId: string, keyData: string, data: {
|
|
@@ -331,6 +332,7 @@ export type BaseAPIType = {
|
|
|
331
332
|
packages: PackageType[];
|
|
332
333
|
}) => Promise<AccountDetails>;
|
|
333
334
|
fetchEventsByAccount: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
|
|
335
|
+
importTickets: (basePath: string, token: string, eventId: string, ticketsList: string[]) => Promise<ResponsePaginationType<TicketServerResponse>>;
|
|
334
336
|
};
|
|
335
337
|
export type EventAPIType = {
|
|
336
338
|
config: BaseAPIConfigType;
|
|
@@ -351,6 +353,7 @@ export type EventAPIType = {
|
|
|
351
353
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
352
354
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
353
355
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
356
|
+
fetchPublicEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
354
357
|
deleteMediaDirectories: (accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
355
358
|
addMediaFolder: (accountId: string, path: string, name: string) => Promise<APIResponse>;
|
|
356
359
|
updateEventWebsite: (eventId: string, keyData: string, data: {
|
|
@@ -590,6 +593,7 @@ export type EventAPIType = {
|
|
|
590
593
|
packages: PackageType[];
|
|
591
594
|
}) => Promise<AccountDetails>;
|
|
592
595
|
fetchEventsByAccount: (accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
|
|
596
|
+
importTickets: (eventId: string, ticketsList: string[]) => Promise<ResponsePaginationType<TicketServerResponse>>;
|
|
593
597
|
};
|
|
594
598
|
export type BaseAPIConfigType = {
|
|
595
599
|
baseUrl?: string;
|
package/lib/utils/api.d.ts
CHANGED
|
@@ -20,3 +20,4 @@ export declare const postRequestWE: (url: string, body?: any, token?: string, he
|
|
|
20
20
|
export declare const deleteRequestWE: (url: string, token: string) => Promise<any>;
|
|
21
21
|
export declare const postFileRequestWE: (url: string, file: File, param: string, token: string) => Promise<any>;
|
|
22
22
|
export declare const postRequestJSON: (url: string, body?: any, token?: string, headers?: any) => Promise<any>;
|
|
23
|
+
export declare const patchRequestWe: (url: string, body: Record<string, string>, token: string) => Promise<any>;
|
package/lib/utils/api.js
CHANGED
|
@@ -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.postRequestJSON = exports.postFileRequestWE = exports.deleteRequestWE = exports.postRequestWE = exports.postRequestWithRetry = exports.postFilesAndDataRequest = exports.validateConfig = exports.getFormRequest = exports.getRequest = exports.patchRequest = exports.putRequest = exports.postFileRequest = exports.deleteRequest = exports.getRequestSimple = exports.postRequestSimple = exports.postRequest = exports.trimUndefined = exports.error400 = void 0;
|
|
12
|
+
exports.patchRequestWe = exports.postRequestJSON = exports.postFileRequestWE = exports.deleteRequestWE = exports.postRequestWE = exports.postRequestWithRetry = exports.postFilesAndDataRequest = exports.validateConfig = exports.getFormRequest = exports.getRequest = exports.patchRequest = exports.putRequest = exports.postFileRequest = exports.deleteRequest = exports.getRequestSimple = exports.postRequestSimple = exports.postRequest = exports.trimUndefined = exports.error400 = void 0;
|
|
13
13
|
exports.error400 = '"status":400';
|
|
14
14
|
const trimUndefined = (obj) => Object.keys(obj).reduce((result, key) => obj[key] === undefined ? result : ((result[key] = obj[key]), result), {});
|
|
15
15
|
exports.trimUndefined = trimUndefined;
|
|
@@ -464,3 +464,5 @@ const postRequestJSON = (url, body, token, headers) => __awaiter(void 0, void 0,
|
|
|
464
464
|
return data;
|
|
465
465
|
});
|
|
466
466
|
exports.postRequestJSON = postRequestJSON;
|
|
467
|
+
const patchRequestWe = (url, body, token) => __awaiter(void 0, void 0, void 0, function* () { return yield (0, exports.postFilesAndDataRequest)(url, body, [], token, "patch"); });
|
|
468
|
+
exports.patchRequestWe = patchRequestWe;
|