@hubs101/js-api-skd-client 1.0.10470 → 1.0.10472

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.
@@ -32,38 +32,38 @@ 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 _b;
35
+ var _a;
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 ((_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;
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;
39
39
  });
40
40
  exports._updateAttendeeImage = _updateAttendeeImage;
41
41
  const _updateAttendee = (basePath, token, updatedAttendee, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
42
- var _c;
42
+ var _a;
43
43
  const base = (0, base_1.getBasePath)(basePath);
44
44
  const attendee = yield (0, api_1.putRequest)(`${base.ATTENDEES}/${attendeeId}`, token, Object.assign({}, updatedAttendee));
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;
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;
46
46
  });
47
47
  exports._updateAttendee = _updateAttendee;
48
48
  const _updateGlobalAttendeeImage = (basePath, token, file, param) => __awaiter(void 0, void 0, void 0, function* () {
49
- var _d;
49
+ var _a;
50
50
  const base = (0, base_1.getBasePath)(basePath);
51
51
  const attendee = yield (0, api_1.postFileRequestWE)(base.PROFILE, file, param, token);
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;
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;
53
53
  });
54
54
  exports._updateGlobalAttendeeImage = _updateGlobalAttendeeImage;
55
55
  const _updateGlobalAttendee = (basePath, token, updatedAttendee) => __awaiter(void 0, void 0, void 0, function* () {
56
- var _e;
56
+ var _a;
57
57
  const base = (0, base_1.getBasePath)(basePath);
58
58
  const attendee = yield (0, api_1.putRequest)(base.PROFILE, token, Object.assign({}, updatedAttendee));
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;
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;
60
60
  });
61
61
  exports._updateGlobalAttendee = _updateGlobalAttendee;
62
62
  const _fetchMyConnections = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
63
- var _f;
63
+ var _a;
64
64
  const base = (0, base_1.getBasePath)(basePath);
65
65
  const myConnections = yield (0, api_1.getRequest)(base.CONNECTIONS, token);
66
- return ((_f = myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) === null || _f === void 0 ? void 0 : _f.data) || (myConnections === null || myConnections === void 0 ? void 0 : myConnections.data) || myConnections;
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;
67
67
  });
68
68
  exports._fetchMyConnections = _fetchMyConnections;
69
69
  const _addConnection = (basePath, token, profile, leadsToken) => __awaiter(void 0, void 0, void 0, function* () {
@@ -138,10 +138,10 @@ const _reportAttendeeAction = (basePath, token, requestData) => __awaiter(void 0
138
138
  });
139
139
  exports._reportAttendeeAction = _reportAttendeeAction;
140
140
  const _fetchMyNotes = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
141
- var _g;
141
+ var _a;
142
142
  const base = (0, base_1.getBasePath)(basePath);
143
143
  const myNotes = yield (0, api_1.getRequest)(`${base.NOTES}`, token);
144
- return ((_g = myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) === null || _g === void 0 ? void 0 : _g.data) || (myNotes === null || myNotes === void 0 ? void 0 : myNotes.data) || myNotes;
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;
145
145
  });
146
146
  exports._fetchMyNotes = _fetchMyNotes;
147
147
  const _createNote = (basePath, token, note) => __awaiter(void 0, void 0, void 0, function* () {
@@ -163,10 +163,10 @@ const _deleteNote = (basePath, token, noteId) => __awaiter(void 0, void 0, void
163
163
  });
164
164
  exports._deleteNote = _deleteNote;
165
165
  const _fetchUserNotifications = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
166
- var _h;
166
+ var _a;
167
167
  const base = (0, base_1.getBasePath)(basePath);
168
168
  const userNotifications = yield (0, api_1.getRequest)(`${base.USER_NOTIFICATIONS}`, token);
169
- return (((_h = userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) === null || _h === void 0 ? void 0 : _h.data) ||
169
+ return (((_a = userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) === null || _a === void 0 ? void 0 : _a.data) ||
170
170
  (userNotifications === null || userNotifications === void 0 ? void 0 : userNotifications.data) ||
171
171
  userNotifications);
172
172
  });
@@ -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 || (exports.NOTE_TYPE = {}));
11
+ })(NOTE_TYPE || (exports.NOTE_TYPE = NOTE_TYPE = {}));
@@ -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 _b;
49
+ var _a;
50
50
  const base = (0, base_1.getBasePath)(basePath);
51
51
  const eventDetails = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}`, token);
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;
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;
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* () {
@@ -173,10 +173,10 @@ const _deleteDiscount = (basePath, token, discountId) => __awaiter(void 0, void
173
173
  });
174
174
  exports._deleteDiscount = _deleteDiscount;
175
175
  const _fetchExhibitionDetails = (basePath, token, exhibitionId) => __awaiter(void 0, void 0, void 0, function* () {
176
- var _c;
176
+ var _a;
177
177
  const base = (0, base_1.getBasePath)(basePath);
178
178
  const exhibitionDetails = yield (0, api_1.getRequest)(`${base.EXHIBITIONS}/${exhibitionId}`, token);
179
- return (((_c = exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) === null || _c === void 0 ? void 0 : _c.data) ||
179
+ return (((_a = exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) === null || _a === void 0 ? void 0 : _a.data) ||
180
180
  (exhibitionDetails === null || exhibitionDetails === void 0 ? void 0 : exhibitionDetails.data) ||
181
181
  exhibitionDetails);
182
182
  });
@@ -200,10 +200,10 @@ const _deleteLocation = (basePath, token, locationId) => __awaiter(void 0, void
200
200
  });
201
201
  exports._deleteLocation = _deleteLocation;
202
202
  const _fetchEventLocations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
203
- var _d;
203
+ var _a;
204
204
  const base = (0, base_1.getBasePath)(basePath);
205
205
  const { data: eventLocations } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/locations`, token);
206
- 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;
206
+ 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;
207
207
  });
208
208
  exports._fetchEventLocations = _fetchEventLocations;
209
209
  const _fetchEventStreams = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -213,19 +213,19 @@ const _fetchEventStreams = (basePath, token, eventId) => __awaiter(void 0, void
213
213
  });
214
214
  exports._fetchEventStreams = _fetchEventStreams;
215
215
  const _fetchUserRegistrationsEvents = (basePath, token) => __awaiter(void 0, void 0, void 0, function* () {
216
- var _e;
216
+ var _a;
217
217
  const base = (0, base_1.getBasePath)(basePath);
218
218
  const { data: userRegistrationsEvents } = yield (0, api_1.getRequest)(`${base.USERS}/registrations`, token);
219
- return (((_e = userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) === null || _e === void 0 ? void 0 : _e.data) ||
219
+ return (((_a = userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) === null || _a === void 0 ? void 0 : _a.data) ||
220
220
  (userRegistrationsEvents === null || userRegistrationsEvents === void 0 ? void 0 : userRegistrationsEvents.data) ||
221
221
  userRegistrationsEvents);
222
222
  });
223
223
  exports._fetchUserRegistrationsEvents = _fetchUserRegistrationsEvents;
224
224
  const _fetchEventDocuments = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
225
- var _f;
225
+ var _a;
226
226
  const base = (0, base_1.getBasePath)(basePath);
227
227
  const { data: eventDocuments } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/documents`, token);
228
- 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;
228
+ 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;
229
229
  });
230
230
  exports._fetchEventDocuments = _fetchEventDocuments;
231
231
  const _assignDocumentToEvent = (basePath, token, eventId, documentId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -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
- { "": "" },
6
- { "1": "default" },
7
- { "2": "highlighted" },
5
+ { "": "" }, // unassigned, top of the list
6
+ { "1": "default" }, // BP
7
+ { "2": "highlighted" }, // PP
8
8
  { "3": "big" }, // LP
9
9
  ];
10
10
  exports.MENU_ITEM_TYPES = {
@@ -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 _b;
23
+ var _a;
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 ((_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;
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;
27
27
  });
28
28
  exports._fetchArrangedMeetings = _fetchArrangedMeetings;
29
29
  const _fetchLocation = (basePath, token, locationId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -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 _b;
23
+ var _a;
24
24
  const base = (0, base_1.getBasePath)(basePath);
25
25
  const postDetails = yield (0, api_1.getRequest)(`${base.POSTS}/${postId}`, token);
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;
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;
27
27
  });
28
28
  exports._fetchPostDetails = _fetchPostDetails;
29
29
  const _likePost = (basePath, token, postId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -4,120 +4,120 @@ export declare const PRODUCTION_URL_UNAUTHORIZED = "https://api.hubs101.com";
4
4
  export declare const STAGING_URL_UNAUTHORIZED = "https://stag-api.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: string;
8
- export declare const STAGING_URL: string;
9
- export declare const UNAUTHORIZED_PRODUCTION_URL: string;
10
- export declare const UNAUTHORIZED_STAGING_URL: string;
7
+ export declare const PRODUCTION_URL = "https://api.hubs101.com/api/v1";
8
+ export declare const STAGING_URL = "https://stag-api.hubs101.com/api/v1";
9
+ export declare const UNAUTHORIZED_PRODUCTION_URL = "https://api.hubs101.com/v1";
10
+ export declare const UNAUTHORIZED_STAGING_URL = "https://stag-api.hubs101.com/v1";
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: `${string}/accounts`;
15
- ATTENDEES: `${string}/attendees`;
14
+ ACCOUNTS: "https://api.hubs101.com/api/v1/accounts";
15
+ ATTENDEES: "https://api.hubs101.com/api/v1/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: `${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`;
22
+ CONNECTIONS: "https://api.hubs101.com/api/v1/users/connections";
23
+ EVENTS: "https://api.hubs101.com/api/v1/events";
24
+ PROFILE: "https://api.hubs101.com/api/v1/users/profile";
25
+ USERS: "https://api.hubs101.com/api/v1/users";
26
+ SESSIONS: "https://api.hubs101.com/api/v1/sessions";
27
+ TRACKS: "https://api.hubs101.com/api/v1/tracks";
28
+ EXHIBITIONS: "https://api.hubs101.com/api/v1/exhibitions";
29
+ USER_EVENTS: "https://api.hubs101.com/api/v1/users/events";
30
30
  REGISTER: "https://api.hubs101.com/v1/register";
31
31
  ZOOM: {
32
32
  SIGNATURE: string;
33
33
  };
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`;
34
+ MEETINGS_USERS_API_KEY: "https://api.hubs101.com/api/v1/users/meetings";
35
+ LOCATION_API_KEY: "https://api.hubs101.com/api/v1/locations";
36
+ MEETINGS_API_KEY: "https://api.hubs101.com/api/v1/meetings";
37
+ POSTS: "https://api.hubs101.com/api/v1/posts";
38
+ LINKEDIN_IMPORT_PROFILE: "https://api.hubs101.com/api/v1/linkedin/authorization";
39
+ ACTIONS_EXHIBITIONS: "https://api.hubs101.com/api/v1/actions/exhibitions";
40
+ ACTIONS_ATTENDEES: "https://api.hubs101.com/api/v1/actions/profiles";
41
+ YOUTUBE_SDK_API: "https://api.hubs101.com/api/v1/sdk/youtube";
42
+ DOCUMENTS: "https://api.hubs101.com/api/v1/documents";
43
+ ACTIONS_SESSIONS: "https://api.hubs101.com/api/v1/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.hubs101.com/versions";
47
47
  PASSWORD_ACTIVATION: "https://api.hubs101.com/v1/activation";
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`;
48
+ VIMEO_VIEW: "https://api.hubs101.com/api/v1/sdk/vimeo/mobile";
49
+ NOTES: "https://api.hubs101.com/api/v1/users/notes";
50
+ MEETINGS_ARRANGE: "https://api.hubs101.com/api/v1/meetings/arrange";
51
+ USER_NOTIFICATIONS: "https://api.hubs101.com/api/v1/users/notifications";
52
+ NOTIFICATIONS: "https://api.hubs101.com/api/v1/notifications";
53
+ GROUPS: "https://api.hubs101.com/api/v1/groups";
54
+ OPTIONS: "https://api.hubs101.com/api/v1/options";
55
+ TICKETS: "https://api.hubs101.com/api/v1/tickets";
56
+ DISCOUNTS: "https://api.hubs101.com/api/v1/discounts";
57
+ LOCATIONS: "https://api.hubs101.com/api/v1/locations";
58
+ PAGES: "https://api.hubs101.com/api/v1/pages";
59
+ PORTFOLIOS: "https://api.hubs101.com/api/v1/portfolios";
60
+ PAYMENT_ACCOUNTS: "https://api.hubs101.com/api/v1/payment-account";
61
+ ACCOUNT_TRIAL: "https://api.hubs101.com/v1/accounts/trial";
62
+ INVITATION: "https://api.hubs101.com/v1/invitation";
63
+ BOOKINGS: "https://api.hubs101.com/api/v1/bookings";
64
+ PUBLIC_BOOKINGS: "https://api.hubs101.com/v1/bookings";
65
65
  }>;
66
66
  export declare const API_STAGE_PATH: Readonly<{
67
- ACCOUNTS: `${string}/accounts`;
68
- ATTENDEES: `${string}/attendees`;
67
+ ACCOUNTS: "https://stag-api.hubs101.com/api/v1/accounts";
68
+ ATTENDEES: "https://stag-api.hubs101.com/api/v1/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: `${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`;
75
+ CONNECTIONS: "https://stag-api.hubs101.com/api/v1/users/connections";
76
+ EVENTS: "https://stag-api.hubs101.com/api/v1/events";
77
+ PROFILE: "https://stag-api.hubs101.com/api/v1/users/profile";
78
+ USERS: "https://stag-api.hubs101.com/api/v1/users";
79
+ SESSIONS: "https://stag-api.hubs101.com/api/v1/sessions";
80
+ TRACKS: "https://stag-api.hubs101.com/api/v1/tracks";
81
+ EXHIBITIONS: "https://stag-api.hubs101.com/api/v1/exhibitions";
82
+ USER_EVENTS: "https://stag-api.hubs101.com/api/v1/users/events";
83
83
  REGISTER: "https://stag-api.hubs101.com/v1/register";
84
84
  ZOOM: {
85
85
  SIGNATURE: string;
86
86
  };
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`;
87
+ MEETINGS_USERS_API_KEY: "https://stag-api.hubs101.com/api/v1/users/meetings";
88
+ LOCATION_API_KEY: "https://stag-api.hubs101.com/api/v1/locations";
89
+ MEETINGS_API_KEY: "https://stag-api.hubs101.com/api/v1/meetings";
90
+ POSTS: "https://stag-api.hubs101.com/api/v1/posts";
91
+ LINKEDIN_IMPORT_PROFILE: "https://stag-api.hubs101.com/api/v1/linkedin/authorization";
92
+ ACTIONS_EXHIBITIONS: "https://stag-api.hubs101.com/api/v1/actions/exhibitions";
93
+ ACTIONS_ATTENDEES: "https://stag-api.hubs101.com/api/v1/actions/profiles";
94
+ YOUTUBE_SDK_API: "https://stag-api.hubs101.com/api/v1/sdk/youtube";
95
+ DOCUMENTS: "https://stag-api.hubs101.com/api/v1/documents";
96
+ ACTIONS_SESSIONS: "https://stag-api.hubs101.com/api/v1/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://stag-api.hubs101.com/versions";
100
100
  PASSWORD_ACTIVATION: "https://stag-api.hubs101.com/v1/activation";
101
101
  JITSI_RAW: "https://staging.hubs101.com/virtual-meeting-raw";
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`;
102
+ VIMEO_VIEW: "https://stag-api.hubs101.com/api/v1/sdk/vimeo/mobile";
103
+ NOTES: "https://stag-api.hubs101.com/api/v1/users/notes";
104
+ MEETINGS_ARRANGE: "https://stag-api.hubs101.com/api/v1/meetings/arrange";
105
+ USER_NOTIFICATIONS: "https://stag-api.hubs101.com/api/v1/users/notifications";
106
+ NOTIFICATIONS: "https://stag-api.hubs101.com/api/v1/notifications";
107
+ GROUPS: "https://stag-api.hubs101.com/api/v1/groups";
108
+ OPTIONS: "https://stag-api.hubs101.com/api/v1/options";
109
+ TICKETS: "https://stag-api.hubs101.com/api/v1/tickets";
110
+ DISCOUNTS: "https://stag-api.hubs101.com/api/v1/discounts";
111
+ LOCATIONS: "https://stag-api.hubs101.com/api/v1/locations";
112
+ PAGES: "https://stag-api.hubs101.com/api/v1/pages";
113
+ PORTFOLIOS: "https://stag-api.hubs101.com/api/v1/portfolios";
114
+ PAYMENT_ACCOUNTS: "https://stag-api.hubs101.com/api/v1/payment-account";
115
+ ACCOUNT_TRIAL: "https://stag-api.hubs101.com/v1/accounts/trial";
116
+ INVITATION: "https://stag-api.hubs101.com/v1/invitation";
117
+ BOOKINGS: "https://stag-api.hubs101.com/api/v1/bookings";
118
+ PUBLIC_BOOKINGS: "https://stag-api.hubs101.com/v1/bookings";
119
+ ACTIONS_EVENTS: "https://stag-api.hubs101.com/api/v1/actions/events";
120
+ ACTIONS_ATTENDEE: "https://stag-api.hubs101.com/api/v1/actions/attendees";
121
121
  }>;
122
122
  export declare const ACTION_NAME: {
123
123
  readonly VIEW: "view";
package/lib/index.js CHANGED
@@ -32,7 +32,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
32
32
  });
33
33
  };
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
- exports.useAPIContext = exports.BaseAPI = exports.EventAPIProvider = void 0;
35
+ exports.useAPIContext = exports.BaseAPI = void 0;
36
+ exports.EventAPIProvider = EventAPIProvider;
36
37
  const EventAPIContext_1 = __importStar(require("./api/context/EventAPIContext"));
37
38
  /* eslint-disable prefer-arrow/prefer-arrow-functions */
38
39
  const react_1 = __importStar(require("react"));
@@ -1173,7 +1174,6 @@ function EventAPIProvider(props) {
1173
1174
  fetchMediaFileDetails,
1174
1175
  } }, props.children));
1175
1176
  }
1176
- exports.EventAPIProvider = EventAPIProvider;
1177
1177
  exports.BaseAPI = {
1178
1178
  fetchEventRegistrations: event_1._fetchEventRegistrations,
1179
1179
  fetchExhibitions: event_1._fetchExhibitions,
package/lib/utils/api.js CHANGED
@@ -38,7 +38,7 @@ const postRequest = (url, body, token, headers) => __awaiter(void 0, void 0, voi
38
38
  data = yield response.json();
39
39
  }
40
40
  catch (e) {
41
- // Do nothing
41
+ console.log("Error in postRequest", e);
42
42
  }
43
43
  if (String(data === null || data === void 0 ? void 0 : data.status).startsWith("4")) {
44
44
  if (data === null || data === void 0 ? void 0 : data.invalid_fields) {
@@ -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, token, body, withoutStatus = true) => __awaiter(void 0, void 0, void 0, function* () {
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) {
168
168
  let form;
169
169
  if (body) {
170
170
  form = new FormData();
@@ -174,7 +174,7 @@ const putRequest = (url, token, body, withoutStatus = true) => __awaiter(void 0,
174
174
  form.append("_method", "put");
175
175
  }
176
176
  const response = yield fetch(url, {
177
- method: "POST",
177
+ method: "POST", // Don't change it according changes happened in backend https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
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",
207
+ method: "POST", // Don't change it according changes happened in backend https://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
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 _c, _d;
275
+ var _a, _b;
276
276
  const getFormData = (object) => Object.keys(object).reduce((form, key) => {
277
277
  form.append(key, object[key]);
278
278
  return form;
@@ -311,7 +311,7 @@ const postFilesAndDataRequest = (url, payload, files, token, method) => __awaite
311
311
  throw new Error("Sorry you don't have enough access. Please make sure you have the correct right access.");
312
312
  }
313
313
  if (data.status === 400 && data.invalid_fields) {
314
- throw new Error((_c = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _c === void 0 ? void 0 : _c.join(", "));
314
+ 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
315
  }
316
316
  const isSuccess = (data === null || data === void 0 ? void 0 : data.status) >= 200 && (data === null || data === void 0 ? void 0 : data.status) <= 299;
317
317
  if (!isSuccess && !(data === null || data === void 0 ? void 0 : data.result)) {
@@ -320,7 +320,7 @@ const postFilesAndDataRequest = (url, payload, files, token, method) => __awaite
320
320
  if (!isSuccess && data.message) {
321
321
  throw new Error(data.message);
322
322
  }
323
- 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;
323
+ 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
324
  });
325
325
  exports.postFilesAndDataRequest = postFilesAndDataRequest;
326
326
  const postRequestWithRetry = (url, body, token, headers, retries) => __awaiter(void 0, void 0, void 0, function* () {
@@ -351,7 +351,7 @@ const postRequestWithRetry = (url, body, token, headers, retries) => __awaiter(v
351
351
  });
352
352
  exports.postRequestWithRetry = postRequestWithRetry;
353
353
  const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
354
- var _e;
354
+ var _a;
355
355
  let form;
356
356
  if (body) {
357
357
  if (headers &&
@@ -379,7 +379,7 @@ const postRequestWE = (url, body, token, headers) => __awaiter(void 0, void 0, v
379
379
  throw new Error("errors.api-40900000");
380
380
  }
381
381
  if (data.status === 400 && data.invalid_fields) {
382
- throw new Error((_e = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _e === void 0 ? void 0 : _e.toString());
382
+ 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
383
  }
384
384
  if (String(data.status).startsWith("4")) {
385
385
  throw new Error(data.message);
@@ -424,7 +424,7 @@ const postFileRequestWE = (url, file, param, token) => __awaiter(void 0, void 0,
424
424
  });
425
425
  exports.postFileRequestWE = postFileRequestWE;
426
426
  const postRequestJSON = (url, body, token, headers) => __awaiter(void 0, void 0, void 0, function* () {
427
- var _f;
427
+ var _a;
428
428
  let form;
429
429
  if (body) {
430
430
  if ((headers &&
@@ -455,7 +455,7 @@ const postRequestJSON = (url, body, token, headers) => __awaiter(void 0, void 0,
455
455
  throw new Error("errors.api-40900000");
456
456
  }
457
457
  if (data.status === 400 && data.invalid_fields) {
458
- throw new Error((_f = Object.values(data === null || data === void 0 ? void 0 : data.invalid_fields)) === null || _f === void 0 ? void 0 : _f.toString());
458
+ 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
459
  }
460
460
  if (String(data.status).startsWith("4")) {
461
461
  throw new Error(data.message);
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`,
40
+ YOUTUBE_SDK_API: `${authorizedBasePath}/sdk/zoom/youtube`, // Remove zoom from path once changed in backend
41
41
  DOCUMENTS: `${authorizedBasePath}/documents`,
42
42
  LOCATIONS: `${authorizedBasePath}/locations`,
43
43
  PAGES: `${authorizedBasePath}/pages`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10470",
3
+ "version": "1.0.10472",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",
@@ -13,7 +13,8 @@
13
13
  "preversion": "npm run lint",
14
14
  "version": "npm run format && git add -A src",
15
15
  "postversion": "git push && git push --tags",
16
- "new-version": "git pull ; npm run build ; git commit -m \"update api\" -a --no-verify ; npm version patch && npm publish"
16
+ "new-version": "git pull ; npm run build ; git commit -m \"update api\" -a --no-verify ; npm version patch && npm publish",
17
+ "delete:all": "rm -rf node_modules/ && rm -rf package-lock.json && npm cache clean --force"
17
18
  },
18
19
  "meta": {},
19
20
  "description": "Package for easy access to Event App API",
@@ -28,7 +29,6 @@
28
29
  ],
29
30
  "license": "ISC",
30
31
  "dependencies": {
31
- "@hubs101/js-api-skd-client": "^1.0.10314",
32
32
  "@types/react": "*",
33
33
  "react": "^18.2.0"
34
34
  },
@@ -43,20 +43,18 @@
43
43
  "test": "test"
44
44
  },
45
45
  "devDependencies": {
46
- "@types/jest": "^29.5.0",
47
- "@typescript-eslint/eslint-plugin": "^6.21.0",
48
- "@typescript-eslint/parser": "^6.21.0",
49
- "eslint": "^8.57.0",
50
- "eslint-config-prettier": "^9.0.0",
46
+ "@types/jest": "^29.5.13",
47
+ "@typescript-eslint/eslint-plugin": "^8.7.0",
48
+ "@typescript-eslint/parser": "^8.7.0",
49
+ "eslint": "^8.57.1",
50
+ "eslint-config-prettier": "^9.1.0",
51
51
  "eslint-plugin-jsdoc": "^46.6.0",
52
52
  "eslint-plugin-prefer-arrow": "^1.2.3",
53
53
  "eslint-plugin-react": "^7.33.2",
54
- "jest": "^29.5.0",
55
- "prettier": "^2.8.7",
56
- "ts-jest": "^29.1.0",
57
- "tslint": "^6.1.3",
58
- "tslint-config-prettier": "^1.18.0",
59
- "typescript": "^5.0.4"
54
+ "jest": "^29.7.0",
55
+ "prettier": "^3.3.3",
56
+ "ts-jest": "^29.2.5",
57
+ "typescript": "^5.6.2"
60
58
  },
61
59
  "files": [
62
60
  "lib/**/*"