@hubs101/js-api-skd-client 1.0.10396 → 1.0.10399
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.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LoginResponse, ResetPasswordBody, SendResetPasswordBody } from "../context/types";
|
|
2
|
-
import { GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "./types";
|
|
2
|
+
import { GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "./types";
|
|
3
3
|
import { GroupType } from "../event/types";
|
|
4
4
|
import { ResponsePaginationType } from "../public/types";
|
|
5
5
|
export declare const _login: (basePath: string, email: string, password: string) => Promise<LoginResponse>;
|
|
@@ -21,3 +21,4 @@ export declare const _deleteFinanceManager: (basePath: string, token: string, ac
|
|
|
21
21
|
export declare const _deletePaymentAccount: (basePath: string, token: string, paymentAccountId: string) => Promise<any>;
|
|
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
|
+
export declare const _createAccountGroup: (basePath: string, token: string, accountId: 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._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._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* () {
|
|
@@ -130,7 +130,12 @@ const _fetchAccountEvents = (basePath, token, url) => __awaiter(void 0, void 0,
|
|
|
130
130
|
exports._fetchAccountEvents = _fetchAccountEvents;
|
|
131
131
|
const _fetchAccountGroups = (basePath, token, accountId, type) => __awaiter(void 0, void 0, void 0, function* () {
|
|
132
132
|
const base = (0, base_1.getBasePath)(basePath);
|
|
133
|
-
const
|
|
133
|
+
const groups = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/groups?type=${type}`, token);
|
|
134
134
|
return groups;
|
|
135
135
|
});
|
|
136
136
|
exports._fetchAccountGroups = _fetchAccountGroups;
|
|
137
|
+
const _createAccountGroup = (basePath, token, accountId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
138
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
139
|
+
return (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/groups`, data, token);
|
|
140
|
+
});
|
|
141
|
+
exports._createAccountGroup = _createAccountGroup;
|
package/lib/index.js
CHANGED
|
@@ -145,6 +145,10 @@ function EventAPIProvider(props) {
|
|
|
145
145
|
(0, api_1.validateConfig)(config);
|
|
146
146
|
return (0, authentication_1._fetchAccountGroups)(config.baseUrl, config.token, accountId, type);
|
|
147
147
|
}), [config, config.baseUrl, config.token]);
|
|
148
|
+
const createAccountGroup = (0, react_1.useCallback)((accountId, body) => __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
(0, api_1.validateConfig)(config);
|
|
150
|
+
return (0, authentication_1._createAccountGroup)(config.baseUrl, config.token, accountId, body);
|
|
151
|
+
}), [config, config.baseUrl, config.token]);
|
|
148
152
|
const fetchEventAttendeeActions = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
|
|
149
153
|
(0, api_1.validateConfig)(config);
|
|
150
154
|
return (0, event_1._fetchEventAttendeeActions)(config.baseUrl, config.token, eventId);
|
|
@@ -1086,6 +1090,7 @@ function EventAPIProvider(props) {
|
|
|
1086
1090
|
fetchPortfolioEvents,
|
|
1087
1091
|
fetchBlogPages,
|
|
1088
1092
|
createBlogPage,
|
|
1093
|
+
createAccountGroup,
|
|
1089
1094
|
} }, props.children));
|
|
1090
1095
|
}
|
|
1091
1096
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1292,5 +1297,6 @@ exports.BaseAPI = {
|
|
|
1292
1297
|
fetchPortfolioEvents: event_1._fetchPortfolioEvents,
|
|
1293
1298
|
fetchBlogPages: event_1._fetchBlogPages,
|
|
1294
1299
|
createBlogPage: event_1._createBlogPage,
|
|
1300
|
+
createAccountGroup: authentication_1._createAccountGroup,
|
|
1295
1301
|
};
|
|
1296
1302
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
|
|
2
|
-
import { GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
|
|
2
|
+
import { GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
|
|
3
3
|
import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
|
|
4
4
|
import { Account, AccountInput, Answer, BlogPage, BlogPageInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, GroupType, OptionServerResponse, Portfolio, PortfolioInput, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
|
|
5
5
|
import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
|
|
@@ -298,6 +298,7 @@ export type BaseAPIType = {
|
|
|
298
298
|
value: File;
|
|
299
299
|
}[]) => Promise<BlogPage>;
|
|
300
300
|
fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
|
|
301
|
+
createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
|
|
301
302
|
};
|
|
302
303
|
export type EventAPIType = {
|
|
303
304
|
config: BaseAPIConfigType;
|
|
@@ -525,6 +526,7 @@ export type EventAPIType = {
|
|
|
525
526
|
value: File;
|
|
526
527
|
}[]) => Promise<BlogPage>;
|
|
527
528
|
fetchBlogPages: (accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
|
|
529
|
+
createAccountGroup: (accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
|
|
528
530
|
};
|
|
529
531
|
export type BaseAPIConfigType = {
|
|
530
532
|
baseUrl?: string;
|