@hubs101/js-api-skd-client 1.0.10254 → 1.0.10256
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/public/index.d.ts +1 -0
- package/lib/api/public/index.js +10 -1
- package/lib/index.js +6 -0
- package/lib/types/base.d.ts +2 -0
- package/package.json +1 -1
|
@@ -4,3 +4,4 @@ import { PublicEventItem, ResponsePaginationType } from "./types";
|
|
|
4
4
|
export declare const _fetchAllPublicEvents: (basePath: string, nbPage?: number, params?: string) => Promise<ResponsePaginationType<PublicEventItem>>;
|
|
5
5
|
export declare const _fetchPublicExhibitions: (basePath: string, eventId: string, nbPage?: number, params?: string) => Promise<ResponsePaginationType<Exhibition>>;
|
|
6
6
|
export declare const _fetchPublicAgenda: (basePath: string, eventId: string, nbPage?: number, params?: string) => Promise<ResponsePaginationType<Session>>;
|
|
7
|
+
export declare const _getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
package/lib/api/public/index.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._fetchPublicAgenda = exports._fetchPublicExhibitions = exports._fetchAllPublicEvents = void 0;
|
|
12
|
+
exports._getPublicRegistrationForm = exports._fetchPublicAgenda = exports._fetchPublicExhibitions = exports._fetchAllPublicEvents = void 0;
|
|
13
13
|
const api_1 = require("../../utils/api");
|
|
14
14
|
const base_1 = require("../../utils/base");
|
|
15
15
|
const _fetchAllPublicEvents = (basePath, nbPage, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -51,3 +51,12 @@ const _fetchPublicAgenda = (basePath, eventId, nbPage, params) => __awaiter(void
|
|
|
51
51
|
return agenda;
|
|
52
52
|
});
|
|
53
53
|
exports._fetchPublicAgenda = _fetchPublicAgenda;
|
|
54
|
+
const _getPublicRegistrationForm = (basePath, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
56
|
+
const configUrl = () => {
|
|
57
|
+
return `${base.PUBLIC_EVENTS}/${eventId}/registration-form`;
|
|
58
|
+
};
|
|
59
|
+
const data = yield (0, api_1.getRequest)(configUrl());
|
|
60
|
+
return data;
|
|
61
|
+
});
|
|
62
|
+
exports._getPublicRegistrationForm = _getPublicRegistrationForm;
|
package/lib/index.js
CHANGED
|
@@ -140,6 +140,10 @@ function EventAPIProvider(props) {
|
|
|
140
140
|
(0, api_1.validateConfig)(config);
|
|
141
141
|
return (0, event_1._fetchEventGroups)(config.baseUrl, config.token, eventId);
|
|
142
142
|
}), [config, config.baseUrl, config.token]);
|
|
143
|
+
const getPublicRegistrationForm = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, public_1._getPublicRegistrationForm)(config.baseUrl, eventId);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const fetchMyBookings = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, event_1._fetchMyBookings)(config.baseUrl, config.token);
|
|
@@ -791,6 +795,7 @@ function EventAPIProvider(props) {
|
|
|
791
795
|
pinExhibition,
|
|
792
796
|
unpinExhibition,
|
|
793
797
|
fetchEventGroups,
|
|
798
|
+
getPublicRegistrationForm,
|
|
794
799
|
fetchMyBookings,
|
|
795
800
|
assignTicket,
|
|
796
801
|
acceptTicket,
|
|
@@ -968,6 +973,7 @@ exports.BaseAPI = {
|
|
|
968
973
|
pinExhibition: event_1._pinExhibition,
|
|
969
974
|
unpinExhibition: event_1._unpinExhibition,
|
|
970
975
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
976
|
+
getPublicRegistrationForm: public_1._getPublicRegistrationForm,
|
|
971
977
|
fetchMyBookings: event_1._fetchMyBookings,
|
|
972
978
|
assignTicket: event_1._assignTicket,
|
|
973
979
|
acceptTicket: event_1._acceptTicket,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export type BaseAPIType = {
|
|
|
82
82
|
unpinDocument: (basePath: string, token: string, eventId: string, documentId: string) => Promise<boolean>;
|
|
83
83
|
pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
84
84
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
85
|
+
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
85
86
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
86
87
|
fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
87
88
|
assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
@@ -276,6 +277,7 @@ export type EventAPIType = {
|
|
|
276
277
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
277
278
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
278
279
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
280
|
+
getPublicRegistrationForm: (eventId: string) => Promise<any>;
|
|
279
281
|
fetchMyBookings: () => Promise<ResponsePaginationType<Booking>>;
|
|
280
282
|
assignTicket: (bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
281
283
|
acceptTicket: (ticketId: string, access: string, body: any) => Promise<any>;
|