@hubs101/js-api-skd-client 1.0.10431 → 1.0.10433

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.
@@ -22,6 +22,7 @@ export declare const _deletePaymentAccount: (basePath: string, token: string, pa
22
22
  export declare const _fetchAccountEvents: (basePath: string, token: string, url: string) => Promise<ResponseAccountEventsType>;
23
23
  export declare const _fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
24
24
  export declare const _createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
25
+ export declare const _updateAccountGroup: (basePath: string, token: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
25
26
  export declare const _fetchColocatedEvents: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
26
27
  export declare const _createColocatedEvents: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
27
28
  export declare const _editColocatedEvents: (basePath: string, token: string, id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
@@ -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._deleteColocatedEvents = exports._editColocatedEvents = exports._createColocatedEvents = exports._fetchColocatedEvents = 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._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;
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* () {
@@ -139,6 +139,12 @@ const _createAccountGroup = (basePath, token, accountId, data) => __awaiter(void
139
139
  return (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/groups`, data, token);
140
140
  });
141
141
  exports._createAccountGroup = _createAccountGroup;
142
+ const _updateAccountGroup = (basePath, token, groupId, data) => __awaiter(void 0, void 0, void 0, function* () {
143
+ const base = (0, base_1.getBasePath)(basePath);
144
+ const groups = yield (0, api_1.putRequest)(`${base.GROUPS}/${groupId}`, token, data);
145
+ return groups;
146
+ });
147
+ exports._updateAccountGroup = _updateAccountGroup;
142
148
  const _fetchColocatedEvents = (basePath, token, accountId) => __awaiter(void 0, void 0, void 0, function* () {
143
149
  const base = (0, base_1.getBasePath)(basePath);
144
150
  const groups = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/colocated-events`, token);
package/lib/index.js CHANGED
@@ -141,6 +141,10 @@ function EventAPIProvider(props) {
141
141
  (0, api_1.validateConfig)(config);
142
142
  return (0, event_1._fetchEventGroups)(config.baseUrl, config.token, eventId);
143
143
  }), [config, config.baseUrl, config.token]);
144
+ const updateAccountGroup = (0, react_1.useCallback)((groupId, data) => __awaiter(this, void 0, void 0, function* () {
145
+ (0, api_1.validateConfig)(config);
146
+ return (0, authentication_1._updateAccountGroup)(config.baseUrl, config.token, groupId, data);
147
+ }), [config, config.baseUrl, config.token]);
144
148
  const updateVisibilityAttendee = (0, react_1.useCallback)((attendeeId, visibility) => __awaiter(this, void 0, void 0, function* () {
145
149
  (0, api_1.validateConfig)(config);
146
150
  return (0, attendee_1._updateVisibilityAttendee)(config.baseUrl, config.token, attendeeId, visibility);
@@ -936,6 +940,7 @@ function EventAPIProvider(props) {
936
940
  pinExhibition,
937
941
  unpinExhibition,
938
942
  fetchEventGroups,
943
+ updateAccountGroup,
939
944
  updateVisibilityAttendee,
940
945
  fetchAccountGroups,
941
946
  fetchEventAttendeeActions,
@@ -1149,6 +1154,7 @@ exports.BaseAPI = {
1149
1154
  pinExhibition: event_1._pinExhibition,
1150
1155
  unpinExhibition: event_1._unpinExhibition,
1151
1156
  fetchEventGroups: event_1._fetchEventGroups,
1157
+ updateAccountGroup: authentication_1._updateAccountGroup,
1152
1158
  updateVisibilityAttendee: attendee_1._updateVisibilityAttendee,
1153
1159
  fetchAccountGroups: authentication_1._fetchAccountGroups,
1154
1160
  fetchEventAttendeeActions: event_1._fetchEventAttendeeActions,
@@ -89,6 +89,7 @@ export type BaseAPIType = {
89
89
  unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
90
90
  getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
91
91
  fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
92
+ updateAccountGroup: (basePath: string, token: string, groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
92
93
  fetchAccountGroups: (basePath: string, token: string, accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
93
94
  fetchEventAttendeeActions: (basePath: string, token: string, eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
94
95
  fetchAccountBookings: (basePath: string, token: string, accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
@@ -331,6 +332,7 @@ export type EventAPIType = {
331
332
  pinExhibition: (exhibitionId: string) => Promise<boolean>;
332
333
  unpinExhibition: (exhibitionId: string) => Promise<boolean>;
333
334
  fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
335
+ updateAccountGroup: (groupId: string, data: GroupInputType) => Promise<GroupResponseType>;
334
336
  fetchAccountGroups: (accountId: string, type: GroupType) => Promise<ResponsePaginationType<GroupResponseType>>;
335
337
  fetchEventAttendeeActions: (eventId: string) => Promise<ResponseServerType<FetchCurrentEventAttendeesActionsResponse[]>>;
336
338
  fetchAccountBookings: (accountId: string, params?: string) => Promise<ResponsePaginationType<Booking>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10431",
3
+ "version": "1.0.10433",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",