@hubs101/js-api-skd-client 1.0.10320 → 1.0.10322
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/README.md +1 -1
- package/lib/api/attendee/types.d.ts +2 -18
- package/lib/api/context/types.d.ts +2 -0
- package/lib/api/event/index.d.ts +2 -0
- package/lib/api/event/index.js +17 -2
- package/lib/api/sessions/types.d.ts +2 -3
- package/lib/constants/api.d.ts +2 -0
- package/lib/constants/api.js +2 -0
- package/lib/index.js +12 -0
- package/lib/types/base.d.ts +6 -0
- package/lib/utils/base.js +2 -0
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -20,7 +20,7 @@ Accessing API via stateless interface:
|
|
|
20
20
|
|
|
21
21
|
## Creating new release
|
|
22
22
|
|
|
23
|
-
1. Commit al changes to git
|
|
23
|
+
1. Commit al changes to git.
|
|
24
24
|
2. Prepare build: `npm run build`
|
|
25
25
|
3. Create new patch version run: `npm version patch`
|
|
26
26
|
4. Publish package to NPM: `npm publish`
|
|
@@ -282,28 +282,12 @@ export type Note = {
|
|
|
282
282
|
message: string;
|
|
283
283
|
reference: string;
|
|
284
284
|
event: string;
|
|
285
|
-
detail
|
|
286
|
-
title: string;
|
|
287
|
-
subtitle: {
|
|
288
|
-
start_date: string;
|
|
289
|
-
end_date: string;
|
|
290
|
-
};
|
|
291
|
-
url: string;
|
|
292
|
-
eventName: string;
|
|
293
|
-
};
|
|
285
|
+
detail: any;
|
|
294
286
|
updateDate: string;
|
|
295
287
|
};
|
|
296
288
|
export type NoteUpdateInput = {
|
|
297
289
|
message: string;
|
|
298
|
-
detail?:
|
|
299
|
-
title: string;
|
|
300
|
-
subtitle: {
|
|
301
|
-
start_date: string;
|
|
302
|
-
end_date: string;
|
|
303
|
-
};
|
|
304
|
-
url: string;
|
|
305
|
-
eventName: string;
|
|
306
|
-
};
|
|
290
|
+
detail?: any;
|
|
307
291
|
};
|
|
308
292
|
export type NoteInput = {
|
|
309
293
|
type: NOTE_TYPE;
|
package/lib/api/event/index.d.ts
CHANGED
|
@@ -45,11 +45,13 @@ export declare const _unpinDocument: (basePath: string, token: string, eventId:
|
|
|
45
45
|
export declare const _pinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
46
46
|
export declare const _unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
47
47
|
export declare const _fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
48
|
+
export declare const _fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
48
49
|
export declare const _resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
|
|
49
50
|
export declare const _resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
|
|
50
51
|
export declare const _checkBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
51
52
|
export declare const _createBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
52
53
|
export declare const _fetchMyBookings: (basePath: string, token: string) => Promise<ResponsePaginationType<Booking>>;
|
|
54
|
+
export declare const _fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
|
|
53
55
|
export declare const _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
54
56
|
export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
55
57
|
export declare const _postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: any) => Promise<any>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -9,8 +9,8 @@ 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._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 = void 0;
|
|
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._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* () {
|
|
@@ -293,6 +293,12 @@ const _fetchEventGroups = (basePath, token, eventId) => __awaiter(void 0, void 0
|
|
|
293
293
|
return groups;
|
|
294
294
|
});
|
|
295
295
|
exports._fetchEventGroups = _fetchEventGroups;
|
|
296
|
+
const _fetchEventAttendeeActions = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
297
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
298
|
+
const response = yield (0, api_1.getRequest)(`${base.ACTIONS_EVENTS}/${eventId}`, token);
|
|
299
|
+
return response;
|
|
300
|
+
});
|
|
301
|
+
exports._fetchEventAttendeeActions = _fetchEventAttendeeActions;
|
|
296
302
|
const _resendTicketEmail = (basePath, token, ticketId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
297
303
|
const base = (0, base_1.getBasePath)(basePath);
|
|
298
304
|
const response = yield (0, api_1.getRequest)(`${base.TICKETS}/${ticketId}/resend-ticket-email`, token);
|
|
@@ -323,6 +329,15 @@ const _fetchMyBookings = (basePath, token) => __awaiter(void 0, void 0, void 0,
|
|
|
323
329
|
return response;
|
|
324
330
|
});
|
|
325
331
|
exports._fetchMyBookings = _fetchMyBookings;
|
|
332
|
+
const _fetchAccountBookings = (basePath, token, accountId, params) => __awaiter(void 0, void 0, void 0, function* () {
|
|
333
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
334
|
+
const url = params
|
|
335
|
+
? `${base.ACCOUNTS}/${accountId}/bookings?limit=2000${params}`
|
|
336
|
+
: `${base.ACCOUNTS}/${accountId}/bookings?limit=2000`;
|
|
337
|
+
const response = yield (0, api_1.getRequest)(url, token);
|
|
338
|
+
return response;
|
|
339
|
+
});
|
|
340
|
+
exports._fetchAccountBookings = _fetchAccountBookings;
|
|
326
341
|
const _assignTicket = (basePath, token, bookingId, ticketId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
327
342
|
const base = (0, base_1.getBasePath)(basePath);
|
|
328
343
|
const response = yield (0, api_1.postFilesAndDataRequest)(`${base.BOOKINGS}/${bookingId}/assign/${ticketId}`, data, [], token);
|
|
@@ -61,9 +61,8 @@ export type SessionServerResponse = {
|
|
|
61
61
|
advertisement?: PrerecordedVideo | null;
|
|
62
62
|
collaboration: Collaboration;
|
|
63
63
|
priority: number;
|
|
64
|
-
speakers?: Attendee[];
|
|
65
|
-
documents?: DocumentType[];
|
|
66
64
|
promoted_at: string;
|
|
65
|
+
speakers?: any[];
|
|
67
66
|
};
|
|
68
67
|
export type PrerecordedVideo = {
|
|
69
68
|
videoType: string;
|
|
@@ -103,10 +102,10 @@ export type SessionFull = {
|
|
|
103
102
|
heartCount: number;
|
|
104
103
|
priority: number;
|
|
105
104
|
discussion: SessionDiscussion | null;
|
|
105
|
+
documents: DocumentType[];
|
|
106
106
|
like_list: string[];
|
|
107
107
|
watch_list: string[];
|
|
108
108
|
speakers: Attendee[];
|
|
109
|
-
documents: DocumentType[];
|
|
110
109
|
};
|
|
111
110
|
export type SessionDiscussion = {
|
|
112
111
|
commentCount: number;
|
package/lib/constants/api.d.ts
CHANGED
|
@@ -114,6 +114,8 @@ export declare const API_STAGE_PATH: Readonly<{
|
|
|
114
114
|
INVITATION: `${string}/invitation`;
|
|
115
115
|
BOOKINGS: `${string}/bookings`;
|
|
116
116
|
PUBLIC_BOOKINGS: `${string}/bookings`;
|
|
117
|
+
ACTIONS_EVENTS: `${string}/actions/events`;
|
|
118
|
+
ACTIONS_ATTENDEE: `${string}/actions/attendees`;
|
|
117
119
|
}>;
|
|
118
120
|
export declare const ACTION_NAME: {
|
|
119
121
|
readonly VIEW: "view";
|
package/lib/constants/api.js
CHANGED
|
@@ -116,6 +116,8 @@ exports.API_STAGE_PATH = Object.freeze({
|
|
|
116
116
|
INVITATION: `${exports.UNAUTHORIZED_STAGING_URL}/invitation`,
|
|
117
117
|
BOOKINGS: `${exports.STAGING_URL}/bookings`,
|
|
118
118
|
PUBLIC_BOOKINGS: `${exports.UNAUTHORIZED_STAGING_URL}/bookings`,
|
|
119
|
+
ACTIONS_EVENTS: `${exports.STAGING_URL}/actions/events`,
|
|
120
|
+
ACTIONS_ATTENDEE: `${exports.STAGING_URL}/actions/attendees`,
|
|
119
121
|
});
|
|
120
122
|
exports.ACTION_NAME = {
|
|
121
123
|
VIEW: "view",
|
package/lib/index.js
CHANGED
|
@@ -140,6 +140,14 @@ 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 fetchEventAttendeeActions = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, event_1._fetchEventAttendeeActions)(config.baseUrl, config.token, eventId);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
147
|
+
const fetchAccountBookings = (0, react_1.useCallback)((accountId, params) => __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
(0, api_1.validateConfig)(config);
|
|
149
|
+
return (0, event_1._fetchAccountBookings)(config.baseUrl, config.token, accountId, params);
|
|
150
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
151
|
const resendTicketEmail = react_1.default.useCallback((ticketId) => __awaiter(this, void 0, void 0, function* () {
|
|
144
152
|
(0, api_1.validateConfig)(config);
|
|
145
153
|
return (0, event_1._resendTicketEmail)(config.baseUrl, config.token, ticketId);
|
|
@@ -847,6 +855,8 @@ function EventAPIProvider(props) {
|
|
|
847
855
|
pinExhibition,
|
|
848
856
|
unpinExhibition,
|
|
849
857
|
fetchEventGroups,
|
|
858
|
+
fetchEventAttendeeActions,
|
|
859
|
+
fetchAccountBookings,
|
|
850
860
|
resendBookingEmail,
|
|
851
861
|
resendTicketEmail,
|
|
852
862
|
postTicketDetails,
|
|
@@ -1038,6 +1048,8 @@ exports.BaseAPI = {
|
|
|
1038
1048
|
pinExhibition: event_1._pinExhibition,
|
|
1039
1049
|
unpinExhibition: event_1._unpinExhibition,
|
|
1040
1050
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
1051
|
+
fetchEventAttendeeActions: event_1._fetchEventAttendeeActions,
|
|
1052
|
+
fetchAccountBookings: event_1._fetchAccountBookings,
|
|
1041
1053
|
resendTicketEmail: event_1._resendTicketEmail,
|
|
1042
1054
|
resendBookingEmail: event_1._resendBookingEmail,
|
|
1043
1055
|
postTicketDetails: event_1._postTicketDetails,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -68,6 +68,8 @@ export type ClientBase = {
|
|
|
68
68
|
PUBLIC_TICKETS: string;
|
|
69
69
|
BOOKINGS: string;
|
|
70
70
|
PUBLIC_BOOKINGS: string;
|
|
71
|
+
ACTIONS_EVENTS: string;
|
|
72
|
+
ACTIONS_ATTENDEE: string;
|
|
71
73
|
};
|
|
72
74
|
export type BaseAPIType = {
|
|
73
75
|
fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
|
|
@@ -85,6 +87,8 @@ export type BaseAPIType = {
|
|
|
85
87
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
86
88
|
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
87
89
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
90
|
+
fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
91
|
+
fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
|
|
88
92
|
resendTicketEmail: (basePath: string, token: string, ticketId: string) => Promise<any>;
|
|
89
93
|
resendBookingEmail: (basePath: string, token: string, bookingId: string) => Promise<any>;
|
|
90
94
|
postTicketDetails: (basePath: string, eventId: string, profileId: string, access: string, body: any) => Promise<any>;
|
|
@@ -293,6 +297,8 @@ export type EventAPIType = {
|
|
|
293
297
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
294
298
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
295
299
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
300
|
+
fetchEventAttendeeActions: (eventId: string) => Promise<any>;
|
|
301
|
+
fetchAccountBookings: (accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
|
|
296
302
|
resendTicketEmail: (ticketId: string) => Promise<any>;
|
|
297
303
|
resendBookingEmail: (bookingId: string) => Promise<any>;
|
|
298
304
|
postTicketDetails: (eventId: string, profileId: string, access: string, body: any) => Promise<ResponsePaginationType<BookingDetails>>;
|
package/lib/utils/base.js
CHANGED
|
@@ -64,6 +64,8 @@ const getBasePath = (basePath) => {
|
|
|
64
64
|
PUBLIC_TICKETS: `${publicBasePath}/tickets`,
|
|
65
65
|
BOOKINGS: `${authorizedBasePath}/bookings`,
|
|
66
66
|
PUBLIC_BOOKINGS: `${unauthorizedBasePath}/bookings`,
|
|
67
|
+
ACTIONS_EVENTS: `${authorizedBasePath}/actions/events`,
|
|
68
|
+
ACTIONS_ATTENDEE: `${authorizedBasePath}/actions/attendees`,
|
|
67
69
|
});
|
|
68
70
|
};
|
|
69
71
|
exports.getBasePath = getBasePath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubs101/js-api-skd-client",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.10322",
|
|
4
4
|
"author": "Liveware",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "jest --config jestconfig.json",
|
|
@@ -27,7 +27,6 @@
|
|
|
27
27
|
],
|
|
28
28
|
"license": "ISC",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@hubs101/js-api-skd-client": "^1.0.10314",
|
|
31
30
|
"@types/react": "*",
|
|
32
31
|
"react": "^18.2.0"
|
|
33
32
|
},
|