@hubs101/js-api-skd-client 1.0.10530 → 1.0.10532

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.
Files changed (59) hide show
  1. package/lib/api/attendee/index.d.ts +2 -0
  2. package/lib/api/attendee/index.js +31 -17
  3. package/lib/api/attendee/types.d.ts +0 -0
  4. package/lib/api/attendee/types.js +1 -1
  5. package/lib/api/authentication/index.d.ts +1 -0
  6. package/lib/api/authentication/index.js +10 -1
  7. package/lib/api/authentication/types.d.ts +0 -0
  8. package/lib/api/authentication/types.js +0 -0
  9. package/lib/api/calendar/index.d.ts +0 -0
  10. package/lib/api/calendar/index.js +0 -0
  11. package/lib/api/calendar/types.d.ts +0 -0
  12. package/lib/api/calendar/types.js +0 -0
  13. package/lib/api/context/EventAPIContext.d.ts +0 -0
  14. package/lib/api/context/EventAPIContext.js +0 -0
  15. package/lib/api/context/types.d.ts +0 -0
  16. package/lib/api/context/types.js +0 -0
  17. package/lib/api/event/index.d.ts +0 -0
  18. package/lib/api/event/index.js +10 -10
  19. package/lib/api/event/types.d.ts +0 -0
  20. package/lib/api/event/types.js +3 -3
  21. package/lib/api/meetings/index.d.ts +0 -0
  22. package/lib/api/meetings/index.js +2 -2
  23. package/lib/api/meetings/types.d.ts +0 -0
  24. package/lib/api/meetings/types.js +0 -0
  25. package/lib/api/pages/index.d.ts +0 -0
  26. package/lib/api/pages/index.js +0 -0
  27. package/lib/api/pages/types.d.ts +0 -0
  28. package/lib/api/pages/types.js +0 -0
  29. package/lib/api/posts/index.d.ts +0 -0
  30. package/lib/api/posts/index.js +2 -2
  31. package/lib/api/posts/types.d.ts +0 -0
  32. package/lib/api/posts/types.js +0 -0
  33. package/lib/api/public/index.d.ts +0 -0
  34. package/lib/api/public/index.js +0 -0
  35. package/lib/api/public/types.d.ts +0 -0
  36. package/lib/api/public/types.js +0 -0
  37. package/lib/api/sessions/index.d.ts +0 -0
  38. package/lib/api/sessions/index.js +0 -0
  39. package/lib/api/sessions/types.d.ts +0 -0
  40. package/lib/api/sessions/types.js +0 -0
  41. package/lib/api/tracks/index.d.ts +0 -0
  42. package/lib/api/tracks/index.js +0 -0
  43. package/lib/api/tracks/types.d.ts +0 -0
  44. package/lib/api/tracks/types.js +0 -0
  45. package/lib/api/types.d.ts +0 -0
  46. package/lib/api/types.js +0 -0
  47. package/lib/constants/api.d.ts +80 -80
  48. package/lib/constants/api.js +0 -0
  49. package/lib/index.d.ts +0 -0
  50. package/lib/index.js +28 -20
  51. package/lib/types/base.d.ts +6 -0
  52. package/lib/types/base.js +0 -0
  53. package/lib/utils/api.d.ts +0 -0
  54. package/lib/utils/api.js +10 -10
  55. package/lib/utils/base.d.ts +0 -0
  56. package/lib/utils/base.js +1 -1
  57. package/lib/utils/hooks.d.ts +0 -0
  58. package/lib/utils/hooks.js +0 -0
  59. package/package.json +1 -1
@@ -5,8 +5,10 @@ export declare const _fetchAttendeeProfile: (basePath: string, token: string, at
5
5
  export declare const _fetchAttendees: (basePath: string, token: string, eventId: string) => Promise<AttendeeProfile[]>;
6
6
  export declare const _fetchMyUser: (basePath: string, token: string) => Promise<AttendeeProfile>;
7
7
  export declare const _updateAttendeeImage: (basePath: string, token: string, file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
8
+ export declare const _updateAttendeeImageNative: (basePath: string, token: string, file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
8
9
  export declare const _updateAttendee: (basePath: string, token: string, updatedAttendee: AttendeeInput, attendeeId: string) => Promise<AttendeeProfile>;
9
10
  export declare const _updateGlobalAttendeeImage: (basePath: string, token: string, file: any, param: string) => Promise<AttendeeProfile>;
11
+ export declare const _updateGlobalAttendeeImageNative: (basePath: string, token: string, file: any, param: string) => Promise<AttendeeProfile>;
10
12
  export declare const _updateGlobalAttendee: (basePath: string, token: string, updatedAttendee: AttendeeInput) => Promise<AttendeeProfile>;
11
13
  export declare const _fetchMyConnections: (basePath: string, token: string) => Promise<Attendee[]>;
12
14
  export declare const _addConnection: (basePath: string, token: string, profile: string, leadsToken: string) => Promise<void>;
@@ -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._fetchAttendeeDetails = exports._updateVisibilityAttendee = exports._showAttendee = exports._hideAttendee = exports._resendWelcomeEmail = exports._addOnsiteAttendee = exports._removeOnsiteAttendee = exports._checkAvailabilityAttendee = exports._resendConfirmationEmail = exports._confirmAttendee = exports._deleteAllUserNotifications = exports._deleteUserNotification = exports._markUserNotificationAsRead = exports._fetchUserNotifications = exports._deleteNote = exports._updateNote = exports._createNote = exports._fetchMyNotes = exports._reportAttendeeAction = exports._importProfileFromLinkedIn = exports._createAttendee = exports._sendAttendeeOnboardingAnswers = exports._checkout = exports._checkIn = exports._confirmMyEventInvitation = exports._unpinAttendee = exports._pinAttendee = exports._removeConnection = exports._addConnection = exports._fetchMyConnections = exports._updateGlobalAttendee = exports._updateGlobalAttendeeImage = exports._updateAttendee = exports._updateAttendeeImage = exports._fetchMyUser = exports._fetchAttendees = exports._fetchAttendeeProfile = void 0;
12
+ exports._fetchAttendeeDetails = exports._updateVisibilityAttendee = exports._showAttendee = exports._hideAttendee = exports._resendWelcomeEmail = exports._addOnsiteAttendee = exports._removeOnsiteAttendee = exports._checkAvailabilityAttendee = exports._resendConfirmationEmail = exports._confirmAttendee = exports._deleteAllUserNotifications = exports._deleteUserNotification = exports._markUserNotificationAsRead = exports._fetchUserNotifications = exports._deleteNote = exports._updateNote = exports._createNote = exports._fetchMyNotes = exports._reportAttendeeAction = exports._importProfileFromLinkedIn = exports._createAttendee = exports._sendAttendeeOnboardingAnswers = exports._checkout = exports._checkIn = exports._confirmMyEventInvitation = exports._unpinAttendee = exports._pinAttendee = exports._removeConnection = exports._addConnection = exports._fetchMyConnections = exports._updateGlobalAttendee = exports._updateGlobalAttendeeImageNative = exports._updateGlobalAttendeeImage = exports._updateAttendee = exports._updateAttendeeImageNative = exports._updateAttendeeImage = exports._fetchMyUser = exports._fetchAttendees = exports._fetchAttendeeProfile = void 0;
13
13
  const api_1 = require("../../utils/api");
14
14
  const base_1 = require("../../utils/base");
15
15
  const _fetchAttendeeProfile = (basePath, token, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -32,38 +32,52 @@ const _fetchMyUser = (basePath, token) => __awaiter(void 0, void 0, void 0, func
32
32
  });
33
33
  exports._fetchMyUser = _fetchMyUser;
34
34
  const _updateAttendeeImage = (basePath, token, file, param, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
35
- var _a;
35
+ var _b;
36
36
  const base = (0, base_1.getBasePath)(basePath);
37
37
  const attendee = yield (0, api_1.postFileRequestWE)(`${base.ATTENDEES}/${attendeeId}`, file, param, token);
38
- return ((_a = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _a === void 0 ? void 0 : _a.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
38
+ return ((_b = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _b === void 0 ? void 0 : _b.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
39
39
  });
40
40
  exports._updateAttendeeImage = _updateAttendeeImage;
41
+ const _updateAttendeeImageNative = (basePath, token, file, param, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
42
+ var _c;
43
+ const base = (0, base_1.getBasePath)(basePath);
44
+ const attendee = yield (0, api_1.postFileRequest)(`${base.ATTENDEES}/${attendeeId}`, file, param, token);
45
+ return ((_c = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _c === void 0 ? void 0 : _c.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
46
+ });
47
+ exports._updateAttendeeImageNative = _updateAttendeeImageNative;
41
48
  const _updateAttendee = (basePath, token, updatedAttendee, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
42
- var _a;
49
+ var _d;
43
50
  const base = (0, base_1.getBasePath)(basePath);
44
51
  const attendee = yield (0, api_1.putRequest)(`${base.ATTENDEES}/${attendeeId}`, token, Object.assign({}, updatedAttendee));
45
- return ((_a = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _a === void 0 ? void 0 : _a.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
52
+ return ((_d = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _d === void 0 ? void 0 : _d.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
46
53
  });
47
54
  exports._updateAttendee = _updateAttendee;
48
55
  const _updateGlobalAttendeeImage = (basePath, token, file, param) => __awaiter(void 0, void 0, void 0, function* () {
49
- var _a;
56
+ var _e;
50
57
  const base = (0, base_1.getBasePath)(basePath);
51
58
  const attendee = yield (0, api_1.postFileRequestWE)(base.PROFILE, file, param, token);
52
- return ((_a = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _a === void 0 ? void 0 : _a.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
59
+ return ((_e = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _e === void 0 ? void 0 : _e.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
53
60
  });
54
61
  exports._updateGlobalAttendeeImage = _updateGlobalAttendeeImage;
62
+ const _updateGlobalAttendeeImageNative = (basePath, token, file, param) => __awaiter(void 0, void 0, void 0, function* () {
63
+ var _f;
64
+ const base = (0, base_1.getBasePath)(basePath);
65
+ const attendee = yield (0, api_1.postFileRequest)(base.PROFILE, file, param, token);
66
+ return ((_f = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _f === void 0 ? void 0 : _f.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
67
+ });
68
+ exports._updateGlobalAttendeeImageNative = _updateGlobalAttendeeImageNative;
55
69
  const _updateGlobalAttendee = (basePath, token, updatedAttendee) => __awaiter(void 0, void 0, void 0, function* () {
56
- var _a;
70
+ var _g;
57
71
  const base = (0, base_1.getBasePath)(basePath);
58
72
  const attendee = yield (0, api_1.putRequest)(base.PROFILE, token, Object.assign({}, updatedAttendee));
59
- return ((_a = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _a === void 0 ? void 0 : _a.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
73
+ return ((_g = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _g === void 0 ? void 0 : _g.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
60
74
  });
61
75
  exports._updateGlobalAttendee = _updateGlobalAttendee;
62
76
  const _fetchMyConnections = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
63
- var _a;
77
+ var _h;
64
78
  const base = (0, base_1.getBasePath)(basePath);
65
79
  const myConnections = yield (0, api_1.getRequest)(base.CONNECTIONS, token);
66
- return ((_a = myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) === null || _a === void 0 ? void 0 : _a.data) || (myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) || myConnections;
80
+ return ((_h = myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) === null || _h === void 0 ? void 0 : _h.data) || (myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) || myConnections;
67
81
  });
68
82
  exports._fetchMyConnections = _fetchMyConnections;
69
83
  const _addConnection = (basePath, token, profile, leadsToken) => __awaiter(void 0, void 0, void 0, function* () {
@@ -138,10 +152,10 @@ const _reportAttendeeAction = (basePath, token, requestData) => __awaiter(void 0
138
152
  });
139
153
  exports._reportAttendeeAction = _reportAttendeeAction;
140
154
  const _fetchMyNotes = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
141
- var _a;
155
+ var _j;
142
156
  const base = (0, base_1.getBasePath)(basePath);
143
157
  const myNotes = yield (0, api_1.getRequest)(`${base.NOTES}`, token);
144
- return ((_a = myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) === null || _a === void 0 ? void 0 : _a.data) || (myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) || myNotes;
158
+ return ((_j = myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) === null || _j === void 0 ? void 0 : _j.data) || (myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) || myNotes;
145
159
  });
146
160
  exports._fetchMyNotes = _fetchMyNotes;
147
161
  const _createNote = (basePath, token, note) => __awaiter(void 0, void 0, void 0, function* () {
@@ -163,10 +177,10 @@ const _deleteNote = (basePath, token, noteId) => __awaiter(void 0, void 0, void
163
177
  });
164
178
  exports._deleteNote = _deleteNote;
165
179
  const _fetchUserNotifications = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
166
- var _a;
180
+ var _k;
167
181
  const base = (0, base_1.getBasePath)(basePath);
168
182
  const userNotifications = yield (0, api_1.getRequest)(`${base.USER_NOTIFICATIONS}`, token);
169
- return (((_a = userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) === null || _a === void 0 ? void 0 : _a.data) ||
183
+ return (((_k = userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) === null || _k === void 0 ? void 0 : _k.data) ||
170
184
  (userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) ||
171
185
  userNotifications);
172
186
  });
@@ -248,9 +262,9 @@ const _updateVisibilityAttendee = (basePath, token, attendeeId, visibility) => _
248
262
  });
249
263
  exports._updateVisibilityAttendee = _updateVisibilityAttendee;
250
264
  const _fetchAttendeeDetails = (basePath, token, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
251
- var _a;
265
+ var _l;
252
266
  const base = (0, base_1.getBasePath)(basePath);
253
267
  const attendee = yield (0, api_1.getRequest)(`${base.ATTENDEES}/${attendeeId}`, token);
254
- return ((_a = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _a === void 0 ? void 0 : _a.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
268
+ return ((_l = attendee === null || attendee === void 0 ? void 0 : attendee.data) === null || _l === void 0 ? void 0 : _l.data) || (attendee === null || attendee === void 0 ? void 0 : attendee.data) || attendee;
255
269
  });
256
270
  exports._fetchAttendeeDetails = _fetchAttendeeDetails;
File without changes
@@ -8,4 +8,4 @@ var NOTE_TYPE;
8
8
  NOTE_TYPE["PROFILES"] = "profiles";
9
9
  NOTE_TYPE["DOCUMENTS"] = "documents";
10
10
  NOTE_TYPE["MEETINGS"] = "meetings";
11
- })(NOTE_TYPE || (exports.NOTE_TYPE = NOTE_TYPE = {}));
11
+ })(NOTE_TYPE = exports.NOTE_TYPE || (exports.NOTE_TYPE = {}));
@@ -21,6 +21,7 @@ export declare const _inviteFinanceManager: (basePath: string, token: string, ac
21
21
  export declare const _deleteFinanceManager: (basePath: string, token: string, accountId: string, profileId: string) => Promise<any>;
22
22
  export declare const _deletePaymentAccount: (basePath: string, token: string, paymentAccountId: string) => Promise<any>;
23
23
  export declare const _fetchAccountEvents: (basePath: string, token: string, url: string) => Promise<ResponseAccountEventsType>;
24
+ export declare const _fetchEventsByAccount: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
24
25
  export declare const _fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
25
26
  export declare const _createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
26
27
  export declare const _updateAccountGroup: (basePath: string, token: string, accountId: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
@@ -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._updatePackages = exports._deleteColocatedEvents = exports._editColocatedEvents = exports._createColocatedEvents = exports._fetchColocatedEvents = exports._updateAccountGroup = exports._createAccountGroup = exports._fetchAccountGroups = exports._fetchAccountEvents = exports._deletePaymentAccount = exports._deleteFinanceManager = exports._inviteFinanceManager = exports._confirmManagerNative = exports._confirmManager = exports._registerManagerNative = exports._registerManager = exports._deleteContentManager = exports._inviteContentManager = exports._updatePaymentAccount = exports._createPaymentAccount = exports._fetchPaymentAccounts = exports._fetchPaymentAccount = exports._sendNewPassword = exports._resetPassword = exports._logout = exports._login = void 0;
12
+ exports._updatePackages = exports._deleteColocatedEvents = exports._editColocatedEvents = exports._createColocatedEvents = exports._fetchColocatedEvents = exports._updateAccountGroup = exports._createAccountGroup = exports._fetchAccountGroups = exports._fetchEventsByAccount = exports._fetchAccountEvents = exports._deletePaymentAccount = exports._deleteFinanceManager = exports._inviteFinanceManager = exports._confirmManagerNative = exports._confirmManager = exports._registerManagerNative = exports._registerManager = exports._deleteContentManager = exports._inviteContentManager = exports._updatePaymentAccount = exports._createPaymentAccount = exports._fetchPaymentAccounts = exports._fetchPaymentAccount = exports._sendNewPassword = exports._resetPassword = exports._logout = exports._login = void 0;
13
13
  const api_1 = require("../../utils/api");
14
14
  const base_1 = require("../../utils/base");
15
15
  const _login = (basePath, email, password) => __awaiter(void 0, void 0, void 0, function* () {
@@ -128,6 +128,15 @@ const _fetchAccountEvents = (basePath, token, url) => __awaiter(void 0, void 0,
128
128
  return response;
129
129
  });
130
130
  exports._fetchAccountEvents = _fetchAccountEvents;
131
+ const _fetchEventsByAccount = (basePath, token, accountId, params) => __awaiter(void 0, void 0, void 0, function* () {
132
+ const base = (0, base_1.getBasePath)(basePath);
133
+ const url = params
134
+ ? `${base.ACCOUNTS}/${accountId}/events?${params}`
135
+ : `${base.ACCOUNTS}/${accountId}/events`;
136
+ const response = yield (0, api_1.getRequest)(url, token);
137
+ return response;
138
+ });
139
+ exports._fetchEventsByAccount = _fetchEventsByAccount;
131
140
  const _fetchAccountGroups = (basePath, token, accountId, type) => __awaiter(void 0, void 0, void 0, function* () {
132
141
  const base = (0, base_1.getBasePath)(basePath);
133
142
  const groups = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/groups?type=${type}`, token);
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -46,10 +46,10 @@ const _fetchExhibitions = (basePath, token, eventId) => __awaiter(void 0, void 0
46
46
  });
47
47
  exports._fetchExhibitions = _fetchExhibitions;
48
48
  const _fetchEventDetails = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
49
- var _a;
49
+ var _b;
50
50
  const base = (0, base_1.getBasePath)(basePath);
51
51
  const eventDetails = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}`, token);
52
- return ((_a = eventDetails === null || eventDetails === void 0 ? void 0 : eventDetails.data) === null || _a === void 0 ? void 0 : _a.data) || (eventDetails === null || eventDetails === void 0 ? void 0 : eventDetails.data) || eventDetails;
52
+ return ((_b = eventDetails === null || eventDetails === void 0 ? void 0 : eventDetails.data) === null || _b === void 0 ? void 0 : _b.data) || (eventDetails === null || eventDetails === void 0 ? void 0 : eventDetails.data) || eventDetails;
53
53
  });
54
54
  exports._fetchEventDetails = _fetchEventDetails;
55
55
  const _sendNotification = (basePath, token, eventId, message, date, url) => __awaiter(void 0, void 0, void 0, function* () {
@@ -185,10 +185,10 @@ const _deleteDiscount = (basePath, token, discountId) => __awaiter(void 0, void
185
185
  });
186
186
  exports._deleteDiscount = _deleteDiscount;
187
187
  const _fetchExhibitionDetails = (basePath, token, exhibitionId) => __awaiter(void 0, void 0, void 0, function* () {
188
- var _a;
188
+ var _c;
189
189
  const base = (0, base_1.getBasePath)(basePath);
190
190
  const exhibitionDetails = yield (0, api_1.getRequest)(`${base.EXHIBITIONS}/${exhibitionId}`, token);
191
- return (((_a = exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) === null || _a === void 0 ? void 0 : _a.data) ||
191
+ return (((_c = exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) === null || _c === void 0 ? void 0 : _c.data) ||
192
192
  (exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) ||
193
193
  exhibitionDetails);
194
194
  });
@@ -212,10 +212,10 @@ const _deleteLocation = (basePath, token, locationId) => __awaiter(void 0, void
212
212
  });
213
213
  exports._deleteLocation = _deleteLocation;
214
214
  const _fetchEventLocations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
215
- var _a;
215
+ var _d;
216
216
  const base = (0, base_1.getBasePath)(basePath);
217
217
  const { data: eventLocations } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/locations`, token);
218
- return ((_a = eventLocations === null || eventLocations === void 0 ? void 0 : eventLocations.data) === null || _a === void 0 ? void 0 : _a.data) || (eventLocations === null || eventLocations === void 0 ? void 0 : eventLocations.data) || eventLocations;
218
+ return ((_d = eventLocations === null || eventLocations === void 0 ? void 0 : eventLocations.data) === null || _d === void 0 ? void 0 : _d.data) || (eventLocations === null || eventLocations === void 0 ? void 0 : eventLocations.data) || eventLocations;
219
219
  });
220
220
  exports._fetchEventLocations = _fetchEventLocations;
221
221
  const _fetchEventStreams = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -225,19 +225,19 @@ const _fetchEventStreams = (basePath, token, eventId) => __awaiter(void 0, void
225
225
  });
226
226
  exports._fetchEventStreams = _fetchEventStreams;
227
227
  const _fetchUserRegistrationsEvents = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
228
- var _a;
228
+ var _e;
229
229
  const base = (0, base_1.getBasePath)(basePath);
230
230
  const { data: userRegistrationsEvents } = yield (0, api_1.getRequest)(`${base.USERS}/registrations`, token);
231
- return (((_a = userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) === null || _a === void 0 ? void 0 : _a.data) ||
231
+ return (((_e = userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) === null || _e === void 0 ? void 0 : _e.data) ||
232
232
  (userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) ||
233
233
  userRegistrationsEvents);
234
234
  });
235
235
  exports._fetchUserRegistrationsEvents = _fetchUserRegistrationsEvents;
236
236
  const _fetchEventDocuments = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
237
- var _a;
237
+ var _f;
238
238
  const base = (0, base_1.getBasePath)(basePath);
239
239
  const { data: eventDocuments } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/documents`, token);
240
- return ((_a = eventDocuments === null || eventDocuments === void 0 ? void 0 : eventDocuments.data) === null || _a === void 0 ? void 0 : _a.data) || (eventDocuments === null || eventDocuments === void 0 ? void 0 : eventDocuments.data) || eventDocuments;
240
+ return ((_f = eventDocuments === null || eventDocuments === void 0 ? void 0 : eventDocuments.data) === null || _f === void 0 ? void 0 : _f.data) || (eventDocuments === null || eventDocuments === void 0 ? void 0 : eventDocuments.data) || eventDocuments;
241
241
  });
242
242
  exports._fetchEventDocuments = _fetchEventDocuments;
243
243
  const _assignDocumentToEvent = (basePath, token, eventId, documentId) => __awaiter(void 0, void 0, void 0, function* () {
File without changes
@@ -2,9 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MENU_ITEM_TYPE = exports.DEFAULT_MENU_ITEM = exports.DEFAULT_MENU_TYPES = exports.MENU_ITEM_STYLING_TYPE = exports.MENU_ITEM_STYLING = exports.MENU_ITEM_TYPES = exports.GROUP_STYLE = void 0;
4
4
  exports.GROUP_STYLE = [
5
- { "": "" }, // unassigned, top of the list
6
- { "1": "default" }, // BP
7
- { "2": "highlighted" }, // PP
5
+ { "": "" },
6
+ { "1": "default" },
7
+ { "2": "highlighted" },
8
8
  { "3": "big" }, // LP
9
9
  ];
10
10
  exports.MENU_ITEM_TYPES = {
File without changes
@@ -20,10 +20,10 @@ const _fetchMeetings = (basePath, token) => __awaiter(void 0, void 0, void 0, fu
20
20
  });
21
21
  exports._fetchMeetings = _fetchMeetings;
22
22
  const _fetchArrangedMeetings = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
23
- var _a;
23
+ var _b;
24
24
  const base = (0, base_1.getBasePath)(basePath);
25
25
  const response = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/meetings/arranged`, token);
26
- return ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.data) || (response === null || response === void 0 ? void 0 : response.data) || response;
26
+ return ((_b = response === null || response === void 0 ? void 0 : response.data) === null || _b === void 0 ? void 0 : _b.data) || (response === null || response === void 0 ? void 0 : response.data) || response;
27
27
  });
28
28
  exports._fetchArrangedMeetings = _fetchArrangedMeetings;
29
29
  const _fetchLocation = (basePath, token, locationId) => __awaiter(void 0, void 0, void 0, function* () {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -20,10 +20,10 @@ const _fetchPosts = (basePath, token, eventId) => __awaiter(void 0, void 0, void
20
20
  });
21
21
  exports._fetchPosts = _fetchPosts;
22
22
  const _fetchPostDetails = (basePath, token, postId) => __awaiter(void 0, void 0, void 0, function* () {
23
- var _a;
23
+ var _b;
24
24
  const base = (0, base_1.getBasePath)(basePath);
25
25
  const postDetails = yield (0, api_1.getRequest)(`${base.POSTS}/${postId}`, token);
26
- return ((_a = postDetails === null || postDetails === void 0 ? void 0 : postDetails.data) === null || _a === void 0 ? void 0 : _a.data) || (postDetails === null || postDetails === void 0 ? void 0 : postDetails.data) || postDetails;
26
+ return ((_b = postDetails === null || postDetails === void 0 ? void 0 : postDetails.data) === null || _b === void 0 ? void 0 : _b.data) || (postDetails === null || postDetails === void 0 ? void 0 : postDetails.data) || postDetails;
27
27
  });
28
28
  exports._fetchPostDetails = _fetchPostDetails;
29
29
  const _likePost = (basePath, token, postId) => __awaiter(void 0, void 0, void 0, function* () {
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/lib/api/types.js CHANGED
File without changes
@@ -4,120 +4,120 @@ export declare const PRODUCTION_URL_UNAUTHORIZED = "https://api.we-conect.com";
4
4
  export declare const STAGING_URL_UNAUTHORIZED = "https://api-staging.hubs101.com";
5
5
  export declare const WEB_APP_STAGE = "https://staging.hubs101.com";
6
6
  export declare const WEB_APP_PROD = "https://app.hubs101.com";
7
- export declare const PRODUCTION_URL = "https://api.we-conect.com/api/v1";
8
- export declare const STAGING_URL = "https://api-staging.hubs101.com/api/v1";
9
- export declare const UNAUTHORIZED_PRODUCTION_URL = "https://api.we-conect.com/v1";
10
- export declare const UNAUTHORIZED_STAGING_URL = "https://api-staging.hubs101.com/v1";
7
+ export declare const PRODUCTION_URL: string;
8
+ export declare const STAGING_URL: string;
9
+ export declare const UNAUTHORIZED_PRODUCTION_URL: string;
10
+ export declare const UNAUTHORIZED_STAGING_URL: string;
11
11
  export declare const BASE_PROD_RESOURCE_URL = "https://media.hubs101.com/";
12
12
  export declare const BASE_STAGE_RESOURCE_URL = "https://staging-media.hubs101.com/";
13
13
  export declare const API_PROD_PATH: Readonly<{
14
- ACCOUNTS: "https://api.we-conect.com/api/v1/accounts";
15
- ATTENDEES: "https://api.we-conect.com/api/v1/attendees";
14
+ ACCOUNTS: `${string}/accounts`;
15
+ ATTENDEES: `${string}/attendees`;
16
16
  AUTH: {
17
17
  LOGIN: string;
18
18
  LOGOUT: string;
19
19
  TOKEN_REFRESH: string;
20
20
  RESET_PASSWORD: string;
21
21
  };
22
- CONNECTIONS: "https://api.we-conect.com/api/v1/users/connections";
23
- EVENTS: "https://api.we-conect.com/api/v1/events";
24
- PROFILE: "https://api.we-conect.com/api/v1/users/profile";
25
- USERS: "https://api.we-conect.com/api/v1/users";
26
- SESSIONS: "https://api.we-conect.com/api/v1/sessions";
27
- TRACKS: "https://api.we-conect.com/api/v1/tracks";
28
- EXHIBITIONS: "https://api.we-conect.com/api/v1/exhibitions";
29
- USER_EVENTS: "https://api.we-conect.com/api/v1/users/events";
22
+ CONNECTIONS: `${string}/users/connections`;
23
+ EVENTS: `${string}/events`;
24
+ PROFILE: `${string}/users/profile`;
25
+ USERS: `${string}/users`;
26
+ SESSIONS: `${string}/sessions`;
27
+ TRACKS: `${string}/tracks`;
28
+ EXHIBITIONS: `${string}/exhibitions`;
29
+ USER_EVENTS: `${string}/users/events`;
30
30
  REGISTER: "https://api.we-conect.com/v1/register";
31
31
  ZOOM: {
32
32
  SIGNATURE: string;
33
33
  };
34
- MEETINGS_USERS_API_KEY: "https://api.we-conect.com/api/v1/users/meetings";
35
- LOCATION_API_KEY: "https://api.we-conect.com/api/v1/locations";
36
- MEETINGS_API_KEY: "https://api.we-conect.com/api/v1/meetings";
37
- POSTS: "https://api.we-conect.com/api/v1/posts";
38
- LINKEDIN_IMPORT_PROFILE: "https://api.we-conect.com/api/v1/linkedin/authorization";
39
- ACTIONS_EXHIBITIONS: "https://api.we-conect.com/api/v1/actions/exhibitions";
40
- ACTIONS_ATTENDEES: "https://api.we-conect.com/api/v1/actions/profiles";
41
- YOUTUBE_SDK_API: "https://api.we-conect.com/api/v1/sdk/youtube";
42
- DOCUMENTS: "https://api.we-conect.com/api/v1/documents";
43
- ACTIONS_SESSIONS: "https://api.we-conect.com/api/v1/actions/sessions";
34
+ MEETINGS_USERS_API_KEY: `${string}/users/meetings`;
35
+ LOCATION_API_KEY: `${string}/locations`;
36
+ MEETINGS_API_KEY: `${string}/meetings`;
37
+ POSTS: `${string}/posts`;
38
+ LINKEDIN_IMPORT_PROFILE: `${string}/linkedin/authorization`;
39
+ ACTIONS_EXHIBITIONS: `${string}/actions/exhibitions`;
40
+ ACTIONS_ATTENDEES: `${string}/actions/profiles`;
41
+ YOUTUBE_SDK_API: `${string}/sdk/youtube`;
42
+ DOCUMENTS: `${string}/documents`;
43
+ ACTIONS_SESSIONS: `${string}/actions/sessions`;
44
44
  TERMS_URL: "https://hubs101.com/terms-of-use";
45
45
  PRIVACY_URL: "https://hubs101.com/privacy-policy";
46
46
  VERSIONS: "https://api.we-conect.com/versions";
47
47
  PASSWORD_ACTIVATION: "https://api.we-conect.com/v1/activation";
48
- VIMEO_VIEW: "https://api.we-conect.com/api/v1/sdk/vimeo/mobile";
49
- NOTES: "https://api.we-conect.com/api/v1/users/notes";
50
- MEETINGS_ARRANGE: "https://api.we-conect.com/api/v1/meetings/arrange";
51
- USER_NOTIFICATIONS: "https://api.we-conect.com/api/v1/users/notifications";
52
- NOTIFICATIONS: "https://api.we-conect.com/api/v1/notifications";
53
- GROUPS: "https://api.we-conect.com/api/v1/groups";
54
- OPTIONS: "https://api.we-conect.com/api/v1/options";
55
- TICKETS: "https://api.we-conect.com/api/v1/tickets";
56
- DISCOUNTS: "https://api.we-conect.com/api/v1/discounts";
57
- LOCATIONS: "https://api.we-conect.com/api/v1/locations";
58
- PAGES: "https://api.we-conect.com/api/v1/pages";
59
- PORTFOLIOS: "https://api.we-conect.com/api/v1/portfolios";
60
- PAYMENT_ACCOUNTS: "https://api.we-conect.com/api/v1/payment-account";
61
- ACCOUNT_TRIAL: "https://api.we-conect.com/v1/accounts/trial";
62
- INVITATION: "https://api.we-conect.com/v1/invitation";
63
- BOOKINGS: "https://api.we-conect.com/api/v1/bookings";
64
- PUBLIC_BOOKINGS: "https://api.we-conect.com/v1/bookings";
48
+ VIMEO_VIEW: `${string}/sdk/vimeo/mobile`;
49
+ NOTES: `${string}/users/notes`;
50
+ MEETINGS_ARRANGE: `${string}/meetings/arrange`;
51
+ USER_NOTIFICATIONS: `${string}/users/notifications`;
52
+ NOTIFICATIONS: `${string}/notifications`;
53
+ GROUPS: `${string}/groups`;
54
+ OPTIONS: `${string}/options`;
55
+ TICKETS: `${string}/tickets`;
56
+ DISCOUNTS: `${string}/discounts`;
57
+ LOCATIONS: `${string}/locations`;
58
+ PAGES: `${string}/pages`;
59
+ PORTFOLIOS: `${string}/portfolios`;
60
+ PAYMENT_ACCOUNTS: `${string}/payment-account`;
61
+ ACCOUNT_TRIAL: `${string}/accounts/trial`;
62
+ INVITATION: `${string}/invitation`;
63
+ BOOKINGS: `${string}/bookings`;
64
+ PUBLIC_BOOKINGS: `${string}/bookings`;
65
65
  }>;
66
66
  export declare const API_STAGE_PATH: Readonly<{
67
- ACCOUNTS: "https://api-staging.hubs101.com/api/v1/accounts";
68
- ATTENDEES: "https://api-staging.hubs101.com/api/v1/attendees";
67
+ ACCOUNTS: `${string}/accounts`;
68
+ ATTENDEES: `${string}/attendees`;
69
69
  AUTH: {
70
70
  LOGIN: string;
71
71
  LOGOUT: string;
72
72
  TOKEN_REFRESH: string;
73
73
  RESET_PASSWORD: string;
74
74
  };
75
- CONNECTIONS: "https://api-staging.hubs101.com/api/v1/users/connections";
76
- EVENTS: "https://api-staging.hubs101.com/api/v1/events";
77
- PROFILE: "https://api-staging.hubs101.com/api/v1/users/profile";
78
- USERS: "https://api-staging.hubs101.com/api/v1/users";
79
- SESSIONS: "https://api-staging.hubs101.com/api/v1/sessions";
80
- TRACKS: "https://api-staging.hubs101.com/api/v1/tracks";
81
- EXHIBITIONS: "https://api-staging.hubs101.com/api/v1/exhibitions";
82
- USER_EVENTS: "https://api-staging.hubs101.com/api/v1/users/events";
75
+ CONNECTIONS: `${string}/users/connections`;
76
+ EVENTS: `${string}/events`;
77
+ PROFILE: `${string}/users/profile`;
78
+ USERS: `${string}/users`;
79
+ SESSIONS: `${string}/sessions`;
80
+ TRACKS: `${string}/tracks`;
81
+ EXHIBITIONS: `${string}/exhibitions`;
82
+ USER_EVENTS: `${string}/users/events`;
83
83
  REGISTER: "https://api-staging.hubs101.com/v1/register";
84
84
  ZOOM: {
85
85
  SIGNATURE: string;
86
86
  };
87
- MEETINGS_USERS_API_KEY: "https://api-staging.hubs101.com/api/v1/users/meetings";
88
- LOCATION_API_KEY: "https://api-staging.hubs101.com/api/v1/locations";
89
- MEETINGS_API_KEY: "https://api-staging.hubs101.com/api/v1/meetings";
90
- POSTS: "https://api-staging.hubs101.com/api/v1/posts";
91
- LINKEDIN_IMPORT_PROFILE: "https://api-staging.hubs101.com/api/v1/linkedin/authorization";
92
- ACTIONS_EXHIBITIONS: "https://api-staging.hubs101.com/api/v1/actions/exhibitions";
93
- ACTIONS_ATTENDEES: "https://api-staging.hubs101.com/api/v1/actions/profiles";
94
- YOUTUBE_SDK_API: "https://api-staging.hubs101.com/api/v1/sdk/youtube";
95
- DOCUMENTS: "https://api-staging.hubs101.com/api/v1/documents";
96
- ACTIONS_SESSIONS: "https://api-staging.hubs101.com/api/v1/actions/sessions";
87
+ MEETINGS_USERS_API_KEY: `${string}/users/meetings`;
88
+ LOCATION_API_KEY: `${string}/locations`;
89
+ MEETINGS_API_KEY: `${string}/meetings`;
90
+ POSTS: `${string}/posts`;
91
+ LINKEDIN_IMPORT_PROFILE: `${string}/linkedin/authorization`;
92
+ ACTIONS_EXHIBITIONS: `${string}/actions/exhibitions`;
93
+ ACTIONS_ATTENDEES: `${string}/actions/profiles`;
94
+ YOUTUBE_SDK_API: `${string}/sdk/youtube`;
95
+ DOCUMENTS: `${string}/documents`;
96
+ ACTIONS_SESSIONS: `${string}/actions/sessions`;
97
97
  TERMS_URL: "https://hubs101.com/terms-of-use";
98
98
  PRIVACY_URL: "https://hubs101.com/privacy-policy";
99
99
  VERSIONS: "https://api-staging.hubs101.com/versions";
100
100
  PASSWORD_ACTIVATION: "https://api-staging.hubs101.com/v1/activation";
101
101
  JITSI_RAW: "https://staging.hubs101.com/virtual-meeting-raw";
102
- VIMEO_VIEW: "https://api-staging.hubs101.com/api/v1/sdk/vimeo/mobile";
103
- NOTES: "https://api-staging.hubs101.com/api/v1/users/notes";
104
- MEETINGS_ARRANGE: "https://api-staging.hubs101.com/api/v1/meetings/arrange";
105
- USER_NOTIFICATIONS: "https://api-staging.hubs101.com/api/v1/users/notifications";
106
- NOTIFICATIONS: "https://api-staging.hubs101.com/api/v1/notifications";
107
- GROUPS: "https://api-staging.hubs101.com/api/v1/groups";
108
- OPTIONS: "https://api-staging.hubs101.com/api/v1/options";
109
- TICKETS: "https://api-staging.hubs101.com/api/v1/tickets";
110
- DISCOUNTS: "https://api-staging.hubs101.com/api/v1/discounts";
111
- LOCATIONS: "https://api-staging.hubs101.com/api/v1/locations";
112
- PAGES: "https://api-staging.hubs101.com/api/v1/pages";
113
- PORTFOLIOS: "https://api-staging.hubs101.com/api/v1/portfolios";
114
- PAYMENT_ACCOUNTS: "https://api-staging.hubs101.com/api/v1/payment-account";
115
- ACCOUNT_TRIAL: "https://api-staging.hubs101.com/v1/accounts/trial";
116
- INVITATION: "https://api-staging.hubs101.com/v1/invitation";
117
- BOOKINGS: "https://api-staging.hubs101.com/api/v1/bookings";
118
- PUBLIC_BOOKINGS: "https://api-staging.hubs101.com/v1/bookings";
119
- ACTIONS_EVENTS: "https://api-staging.hubs101.com/api/v1/actions/events";
120
- ACTIONS_ATTENDEE: "https://api-staging.hubs101.com/api/v1/actions/attendees";
102
+ VIMEO_VIEW: `${string}/sdk/vimeo/mobile`;
103
+ NOTES: `${string}/users/notes`;
104
+ MEETINGS_ARRANGE: `${string}/meetings/arrange`;
105
+ USER_NOTIFICATIONS: `${string}/users/notifications`;
106
+ NOTIFICATIONS: `${string}/notifications`;
107
+ GROUPS: `${string}/groups`;
108
+ OPTIONS: `${string}/options`;
109
+ TICKETS: `${string}/tickets`;
110
+ DISCOUNTS: `${string}/discounts`;
111
+ LOCATIONS: `${string}/locations`;
112
+ PAGES: `${string}/pages`;
113
+ PORTFOLIOS: `${string}/portfolios`;
114
+ PAYMENT_ACCOUNTS: `${string}/payment-account`;
115
+ ACCOUNT_TRIAL: `${string}/accounts/trial`;
116
+ INVITATION: `${string}/invitation`;
117
+ BOOKINGS: `${string}/bookings`;
118
+ PUBLIC_BOOKINGS: `${string}/bookings`;
119
+ ACTIONS_EVENTS: `${string}/actions/events`;
120
+ ACTIONS_ATTENDEE: `${string}/actions/attendees`;
121
121
  }>;
122
122
  export declare const ACTION_NAME: {
123
123
  readonly VIEW: "view";
File without changes
package/lib/index.d.ts CHANGED
File without changes
package/lib/index.js CHANGED
@@ -15,23 +15,13 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
35
25
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
36
26
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
37
27
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -42,8 +32,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
42
32
  });
43
33
  };
44
34
  Object.defineProperty(exports, "__esModule", { value: true });
45
- exports.useAPIContext = exports.BaseAPI = void 0;
46
- exports.EventAPIProvider = EventAPIProvider;
35
+ exports.useAPIContext = exports.BaseAPI = exports.EventAPIProvider = void 0;
47
36
  const EventAPIContext_1 = __importStar(require("./api/context/EventAPIContext"));
48
37
  /* eslint-disable prefer-arrow/prefer-arrow-functions */
49
38
  const react_1 = __importStar(require("react"));
@@ -339,6 +328,10 @@ function EventAPIProvider(props) {
339
328
  (0, api_1.validateConfig)(config);
340
329
  return (0, authentication_1._fetchAccountEvents)(config.baseUrl, config.token, url);
341
330
  }), [config, config.baseUrl, config.token]);
331
+ const fetchEventsByAccount = (0, react_1.useCallback)((accountId, params) => __awaiter(this, void 0, void 0, function* () {
332
+ (0, api_1.validateConfig)(config);
333
+ return (0, authentication_1._fetchEventsByAccount)(config.baseUrl, config.token, accountId, params);
334
+ }), [config, config.baseUrl, config.token]);
342
335
  const fetchEventPages = (0, react_1.useCallback)((eventId, nbPage, params) => __awaiter(this, void 0, void 0, function* () {
343
336
  (0, api_1.validateConfig)(config);
344
337
  return (0, event_1._fetchEventPages)(config.baseUrl, config.token, eventId, nbPage, params);
@@ -563,6 +556,10 @@ function EventAPIProvider(props) {
563
556
  (0, api_1.validateConfig)(config);
564
557
  return (0, attendee_1._updateAttendeeImage)(config.baseUrl, config.token, file, param, attendeeId);
565
558
  }), [config, config.baseUrl, config.token]);
559
+ const updateAttendeeImageNative = react_1.default.useCallback((file, param, attendeeId) => __awaiter(this, void 0, void 0, function* () {
560
+ (0, api_1.validateConfig)(config);
561
+ return (0, attendee_1._updateAttendeeImageNative)(config.baseUrl, config.token, file, param, attendeeId);
562
+ }), [config, config.baseUrl, config.token]);
566
563
  const updateAttendee = react_1.default.useCallback((updatedAttendee, attendeeId) => __awaiter(this, void 0, void 0, function* () {
567
564
  (0, api_1.validateConfig)(config);
568
565
  return (0, attendee_1._updateAttendee)(config.baseUrl, config.token, updatedAttendee, attendeeId);
@@ -571,6 +568,10 @@ function EventAPIProvider(props) {
571
568
  (0, api_1.validateConfig)(config);
572
569
  return (0, attendee_1._updateGlobalAttendeeImage)(config.baseUrl, config.token, file, param);
573
570
  }), [config, config.baseUrl, config.token]);
571
+ const updateGlobalAttendeeImageNative = react_1.default.useCallback((file, param) => __awaiter(this, void 0, void 0, function* () {
572
+ (0, api_1.validateConfig)(config);
573
+ return (0, attendee_1._updateGlobalAttendeeImageNative)(config.baseUrl, config.token, file, param);
574
+ }), [config, config.baseUrl, config.token]);
574
575
  const updateGlobalAttendee = react_1.default.useCallback((updatedAttendee) => __awaiter(this, void 0, void 0, function* () {
575
576
  (0, api_1.validateConfig)(config);
576
577
  return (0, attendee_1._updateGlobalAttendee)(config.baseUrl, config.token, updatedAttendee);
@@ -1216,9 +1217,13 @@ function EventAPIProvider(props) {
1216
1217
  uploadImageToFolder,
1217
1218
  renameFolder,
1218
1219
  fetchAttendeeDetails,
1219
- updatePackages
1220
+ updatePackages,
1221
+ updateAttendeeImageNative,
1222
+ updateGlobalAttendeeImageNative,
1223
+ fetchEventsByAccount,
1220
1224
  } }, props.children));
1221
1225
  }
1226
+ exports.EventAPIProvider = EventAPIProvider;
1222
1227
  exports.BaseAPI = {
1223
1228
  fetchEventRegistrations: event_1._fetchEventRegistrations,
1224
1229
  fetchExhibitions: event_1._fetchExhibitions,
@@ -1446,5 +1451,8 @@ exports.BaseAPI = {
1446
1451
  renameFolder: event_1._renameFolder,
1447
1452
  fetchAttendeeDetails: attendee_1._fetchAttendeeDetails,
1448
1453
  updatePackages: authentication_1._updatePackages,
1454
+ updateAttendeeImageNative: attendee_1._updateAttendeeImageNative,
1455
+ updateGlobalAttendeeImageNative: attendee_1._updateGlobalAttendeeImageNative,
1456
+ fetchEventsByAccount: authentication_1._fetchEventsByAccount,
1449
1457
  };
1450
1458
  exports.useAPIContext = EventAPIContext_1.useAPIContext;
@@ -194,8 +194,10 @@ export type BaseAPIType = {
194
194
  fetchAttendees: (basePath: string, token: string, eventId: string) => Promise<AttendeeProfile[]>;
195
195
  fetchMyUser: (basePath: string, token: string) => Promise<AttendeeProfile>;
196
196
  updateAttendeeImage: (basePath: string, token: string, file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
197
+ updateAttendeeImageNative: (basePath: string, token: string, file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
197
198
  updateAttendee: (basePath: string, token: string, updatedAttendee: AttendeeInput, attendeeId: string) => Promise<AttendeeProfile>;
198
199
  updateGlobalAttendeeImage: (basePath: string, token: string, file: any, param: string) => Promise<AttendeeProfile>;
200
+ updateGlobalAttendeeImageNative: (basePath: string, token: string, file: any, param: string) => Promise<AttendeeProfile>;
199
201
  updateGlobalAttendee: (basePath: string, token: string, updatedAttendee: AttendeeInput) => Promise<AttendeeProfile>;
200
202
  fetchMyConnections: (basePath: string, token: string) => Promise<Attendee[]>;
201
203
  addConnection: (basePath: string, token: string, profile: string, leadsToken: string) => Promise<void>;
@@ -328,6 +330,7 @@ export type BaseAPIType = {
328
330
  updatePackages: (basePath: string, token: string, accountId: string, data: {
329
331
  packages: PackageType[];
330
332
  }) => Promise<AccountDetails>;
333
+ fetchEventsByAccount: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
331
334
  };
332
335
  export type EventAPIType = {
333
336
  config: BaseAPIConfigType;
@@ -453,8 +456,10 @@ export type EventAPIType = {
453
456
  fetchAttendees: (eventId: string) => Promise<AttendeeProfile[]>;
454
457
  fetchMyUser: () => Promise<AttendeeProfile>;
455
458
  updateAttendeeImage: (file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
459
+ updateAttendeeImageNative: (file: any, param: string, attendeeId: string) => Promise<AttendeeProfile>;
456
460
  updateAttendee: (updatedAttendee: AttendeeInput, attendeeId: string) => Promise<AttendeeProfile>;
457
461
  updateGlobalAttendeeImage: (file: any, param: string) => Promise<AttendeeProfile>;
462
+ updateGlobalAttendeeImageNative: (file: any, param: string) => Promise<AttendeeProfile>;
458
463
  updateGlobalAttendee: (updatedAttendee: AttendeeInput) => Promise<AttendeeProfile>;
459
464
  fetchMyConnections: () => Promise<Attendee[]>;
460
465
  addConnection: (profile: string, leadsToken: string) => Promise<void>;
@@ -584,6 +589,7 @@ export type EventAPIType = {
584
589
  updatePackages: (accountId: string, data: {
585
590
  packages: PackageType[];
586
591
  }) => Promise<AccountDetails>;
592
+ fetchEventsByAccount: (accountId: string, params?: string) => Promise<ResponseAccountEventsType>;
587
593
  };
588
594
  export type BaseAPIConfigType = {
589
595
  baseUrl?: string;
package/lib/types/base.js CHANGED
File without changes
File without changes
package/lib/utils/api.js CHANGED
@@ -164,7 +164,7 @@ const postFileRequest = (url, file, param, token) => __awaiter(void 0, void 0, v
164
164
  return data === null || data === void 0 ? void 0 : data.result;
165
165
  });
166
166
  exports.postFileRequest = postFileRequest;
167
- const putRequest = (url_1, token_1, body_1, ...args_1) => __awaiter(void 0, [url_1, token_1, body_1, ...args_1], void 0, function* (url, token, body, withoutStatus = true) {
167
+ const putRequest = (url, token, body, withoutStatus = true) => __awaiter(void 0, void 0, void 0, function* () {
168
168
  let form;
169
169
  if (body) {
170
170
  form = new FormData();
@@ -174,7 +174,7 @@ const putRequest = (url_1, token_1, body_1, ...args_1) => __awaiter(void 0, [url
174
174
  form.append("_method", "put");
175
175
  }
176
176
  const response = yield fetch(url, {
177
- method: "POST", // Don't change it according changes happened in backend https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
177
+ method: "POST",
178
178
  headers: {
179
179
  accept: "application/json",
180
180
  Authorization: `Bearer ${token}`,
@@ -204,7 +204,7 @@ const patchRequest = (url, token, body) => __awaiter(void 0, void 0, void 0, fun
204
204
  form.append("_method", "patch");
205
205
  }
206
206
  const response = yield fetch(url, {
207
- method: "POST", // Don't change it according changes happened in backend https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
207
+ method: "POST",
208
208
  headers: {
209
209
  accept: "application/json",
210
210
  "Content-Type": "multipart/form-data",
@@ -272,7 +272,7 @@ const validateConfig = (config) => {
272
272
  };
273
273
  exports.validateConfig = validateConfig;
274
274
  const postFilesAndDataRequest = (url, payload, files, token, method) => __awaiter(void 0, void 0, void 0, function* () {
275
- var _a, _b;
275
+ var _c, _d;
276
276
  const getFormData = (object) => Object.keys(object).reduce((form, key) => {
277
277
  form.append(key, object[key]);
278
278
  return form;
@@ -312,7 +312,7 @@ const postFilesAndDataRequest = (url, payload, files, token, method) => __awaite
312
312
  }
313
313
  if (data.status === 400 && data.invalid_fields) {
314
314
  // eslint-disable-next-line @typescript-eslint/no-base-to-string
315
- throw new Error((_a = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _a === void 0 ? void 0 : _a.join(", "));
315
+ throw new Error((_c = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _c === void 0 ? void 0 : _c.join(", "));
316
316
  }
317
317
  const isSuccess = (data === null || data === void 0 ? void 0 : data.status) >= 200 && (data === null || data === void 0 ? void 0 : data.status) <= 299;
318
318
  if (!isSuccess && !(data === null || data === void 0 ? void 0 : data.result)) {
@@ -321,7 +321,7 @@ const postFilesAndDataRequest = (url, payload, files, token, method) => __awaite
321
321
  if (!isSuccess && data.message) {
322
322
  throw new Error(data.message);
323
323
  }
324
- return (_b = data === null || data === void 0 ? void 0 : data.result) !== null && _b !== void 0 ? _b : data === null || data === void 0 ? void 0 : data.message;
324
+ return (_d = data === null || data === void 0 ? void 0 : data.result) !== null && _d !== void 0 ? _d : data === null || data === void 0 ? void 0 : data.message;
325
325
  });
326
326
  exports.postFilesAndDataRequest = postFilesAndDataRequest;
327
327
  const postRequestWithRetry = (url, body, token, headers, retries) => __awaiter(void 0, void 0, void 0, function* () {
@@ -352,7 +352,7 @@ const postRequestWithRetry = (url, body, token, headers, retries) => __awaiter(v
352
352
  });
353
353
  exports.postRequestWithRetry = postRequestWithRetry;
354
354
  const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
355
- var _a;
355
+ var _e;
356
356
  let form;
357
357
  if (body) {
358
358
  if (headers &&
@@ -380,7 +380,7 @@ const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, v
380
380
  throw new Error("errors.api-40900000");
381
381
  }
382
382
  if (data.status === 400 && data.invalid_fields) {
383
- throw new Error((_a = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _a === void 0 ? void 0 : _a.toString());
383
+ throw new Error((_e = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _e === void 0 ? void 0 : _e.toString());
384
384
  }
385
385
  if (String(data.status).startsWith("4")) {
386
386
  throw new Error(data.message);
@@ -425,7 +425,7 @@ const postFileRequestWE = (url, file, param, token) => __awaiter(void 0, void 0,
425
425
  });
426
426
  exports.postFileRequestWE = postFileRequestWE;
427
427
  const postRequestJSON = (url, body, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
428
- var _a;
428
+ var _f;
429
429
  let form;
430
430
  if (body) {
431
431
  if ((headers &&
@@ -456,7 +456,7 @@ const postRequestJSON = (url, body, token, headers) => __awaiter(void 0, void 0,
456
456
  throw new Error("errors.api-40900000");
457
457
  }
458
458
  if (data.status === 400 && data.invalid_fields) {
459
- throw new Error((_a = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _a === void 0 ? void 0 : _a.toString());
459
+ throw new Error((_f = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _f === void 0 ? void 0 : _f.toString());
460
460
  }
461
461
  if (String(data.status).startsWith("4")) {
462
462
  throw new Error(data.message);
File without changes
package/lib/utils/base.js CHANGED
@@ -37,7 +37,7 @@ const getBasePath = (basePath) => {
37
37
  LINKEDIN_IMPORT_PROFILE: `${authorizedBasePath}/linkedin/authorization`,
38
38
  ACTIONS_EXHIBITIONS: `${authorizedBasePath}/actions/exhibitions`,
39
39
  ACTIONS_ATTENDEES: `${authorizedBasePath}/actions/profiles`,
40
- YOUTUBE_SDK_API: `${authorizedBasePath}/sdk/zoom/youtube`, // Remove zoom from path once changed in backend
40
+ YOUTUBE_SDK_API: `${authorizedBasePath}/sdk/zoom/youtube`,
41
41
  DOCUMENTS: `${authorizedBasePath}/documents`,
42
42
  LOCATIONS: `${authorizedBasePath}/locations`,
43
43
  PAGES: `${authorizedBasePath}/pages`,
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10530",
3
+ "version": "1.0.10532",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",