@hubs101/js-api-skd-client 1.0.10418 → 1.0.10419
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 { GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "./types";
|
|
2
|
+
import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, 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>;
|
|
@@ -22,3 +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 _fetchColocatedEventsGroups: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
|
|
26
|
+
export declare const _createColocatedEventsGroup: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
|
|
27
|
+
export declare const _editColocatedEventsGroup: (basePath: string, token: string, id: string, data: ColocatedEventsGroupType) => Promise<ColocatedEventsGroupType>;
|
|
28
|
+
export declare const _deleteColocatedEventsGroup: (basePath: string, token: string, id: string) => Promise<Response>;
|
|
@@ -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._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._deleteColocatedEventsGroup = exports._editColocatedEventsGroup = exports._createColocatedEventsGroup = exports._fetchColocatedEventsGroups = 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,3 +139,27 @@ 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 _fetchColocatedEventsGroups = (basePath, token, accountId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
143
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
144
|
+
const groups = yield (0, api_1.getRequest)(`${base.ACCOUNTS}/${accountId}/colocated-events`, token);
|
|
145
|
+
return groups;
|
|
146
|
+
});
|
|
147
|
+
exports._fetchColocatedEventsGroups = _fetchColocatedEventsGroups;
|
|
148
|
+
const _createColocatedEventsGroup = (basePath, token, accountId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
149
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
150
|
+
const groups = yield (0, api_1.postRequestWE)(`${base.ACCOUNTS}/${accountId}/colocated-events`, data, token);
|
|
151
|
+
return groups;
|
|
152
|
+
});
|
|
153
|
+
exports._createColocatedEventsGroup = _createColocatedEventsGroup;
|
|
154
|
+
const _editColocatedEventsGroup = (basePath, token, id, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
155
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
156
|
+
const groups = yield (0, api_1.putRequest)(`${base.ACCOUNTS}/colocated-events/${id}`, token, data);
|
|
157
|
+
return groups;
|
|
158
|
+
});
|
|
159
|
+
exports._editColocatedEventsGroup = _editColocatedEventsGroup;
|
|
160
|
+
const _deleteColocatedEventsGroup = (basePath, token, id) => __awaiter(void 0, void 0, void 0, function* () {
|
|
161
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
162
|
+
const groups = yield (0, api_1.deleteRequestWE)(`${base.ACCOUNTS}/colocated-events/${id}`, token);
|
|
163
|
+
return groups;
|
|
164
|
+
});
|
|
165
|
+
exports._deleteColocatedEventsGroup = _deleteColocatedEventsGroup;
|
|
@@ -55,3 +55,12 @@ export type GroupInputType = {
|
|
|
55
55
|
style?: string;
|
|
56
56
|
list?: string;
|
|
57
57
|
};
|
|
58
|
+
export type ColocatedEventsGroupInputType = {
|
|
59
|
+
name: string;
|
|
60
|
+
events: string[];
|
|
61
|
+
};
|
|
62
|
+
export type ColocatedEventsGroupType = {
|
|
63
|
+
id: string;
|
|
64
|
+
name: string;
|
|
65
|
+
events: string[];
|
|
66
|
+
};
|
package/lib/index.js
CHANGED
|
@@ -901,6 +901,22 @@ function EventAPIProvider(props) {
|
|
|
901
901
|
(0, api_1.validateConfig)(config);
|
|
902
902
|
return (0, event_1._deletePortfolioBlogPage)(config.baseUrl, config.token, portfolioId, blogPostId);
|
|
903
903
|
}), [config, config.baseUrl, config.token]);
|
|
904
|
+
const fetchColocatedEventsGroups = (0, react_1.useCallback)((accountId) => __awaiter(this, void 0, void 0, function* () {
|
|
905
|
+
(0, api_1.validateConfig)(config);
|
|
906
|
+
return (0, authentication_1._fetchColocatedEventsGroups)(config.baseUrl, config.token, accountId);
|
|
907
|
+
}), [config, config.baseUrl, config.token]);
|
|
908
|
+
const createColocatedEventsGroup = (0, react_1.useCallback)((accountId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
909
|
+
(0, api_1.validateConfig)(config);
|
|
910
|
+
return (0, authentication_1._createColocatedEventsGroup)(config.baseUrl, config.token, accountId, data);
|
|
911
|
+
}), [config, config.baseUrl, config.token]);
|
|
912
|
+
const editColocatedEventsGroup = (0, react_1.useCallback)((id, data) => __awaiter(this, void 0, void 0, function* () {
|
|
913
|
+
(0, api_1.validateConfig)(config);
|
|
914
|
+
return (0, authentication_1._editColocatedEventsGroup)(config.baseUrl, config.token, id, data);
|
|
915
|
+
}), [config, config.baseUrl, config.token]);
|
|
916
|
+
const deleteColocatedEventsGroup = (0, react_1.useCallback)((id) => __awaiter(this, void 0, void 0, function* () {
|
|
917
|
+
(0, api_1.validateConfig)(config);
|
|
918
|
+
return (0, authentication_1._deleteColocatedEventsGroup)(config.baseUrl, config.token, id);
|
|
919
|
+
}), [config, config.baseUrl, config.token]);
|
|
904
920
|
return (react_1.default.createElement(EventAPIContext_1.default.Provider, { value: {
|
|
905
921
|
config,
|
|
906
922
|
init,
|
|
@@ -1111,6 +1127,10 @@ function EventAPIProvider(props) {
|
|
|
1111
1127
|
getPublicGroupDetails,
|
|
1112
1128
|
updatePortfolioBlogPage,
|
|
1113
1129
|
deletePortfolioBlogPage,
|
|
1130
|
+
fetchColocatedEventsGroups,
|
|
1131
|
+
createColocatedEventsGroup,
|
|
1132
|
+
editColocatedEventsGroup,
|
|
1133
|
+
deleteColocatedEventsGroup,
|
|
1114
1134
|
} }, props.children));
|
|
1115
1135
|
}
|
|
1116
1136
|
exports.EventAPIProvider = EventAPIProvider;
|
|
@@ -1322,5 +1342,9 @@ exports.BaseAPI = {
|
|
|
1322
1342
|
getPublicGroupDetails: public_1._getPublicGroupDetails,
|
|
1323
1343
|
updatePortfolioBlogPage: event_1._updatePortfolioBlogPage,
|
|
1324
1344
|
deletePortfolioBlogPage: event_1._deletePortfolioBlogPage,
|
|
1345
|
+
fetchColocatedEventsGroups: authentication_1._fetchColocatedEventsGroups,
|
|
1346
|
+
createColocatedEventsGroup: authentication_1._createColocatedEventsGroup,
|
|
1347
|
+
editColocatedEventsGroup: authentication_1._editColocatedEventsGroup,
|
|
1348
|
+
deleteColocatedEventsGroup: authentication_1._deleteColocatedEventsGroup,
|
|
1325
1349
|
};
|
|
1326
1350
|
exports.useAPIContext = EventAPIContext_1.useAPIContext;
|
package/lib/types/base.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, SuccessResponse, UserNotification } from "../api/attendee/types";
|
|
2
|
-
import { GroupInputType, GroupResponseType, PublicGroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
|
|
2
|
+
import { ColocatedEventsGroupInputType, ColocatedEventsGroupType, GroupInputType, GroupResponseType, PublicGroupResponseType, 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";
|
|
@@ -307,6 +307,10 @@ export type BaseAPIType = {
|
|
|
307
307
|
value: File;
|
|
308
308
|
}[]) => Promise<BlogPage>;
|
|
309
309
|
deletePortfolioBlogPage: (basePath: string, token: string, portfolioId: string, blogPostId: string) => Promise<Response>;
|
|
310
|
+
fetchColocatedEventsGroups: (basePath: string, token: string, accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
|
|
311
|
+
createColocatedEventsGroup: (basePath: string, token: string, accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
|
|
312
|
+
editColocatedEventsGroup: (basePath: string, token: string, id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
|
|
313
|
+
deleteColocatedEventsGroup: (basePath: string, token: string, id: string) => Promise<Response>;
|
|
310
314
|
};
|
|
311
315
|
export type EventAPIType = {
|
|
312
316
|
config: BaseAPIConfigType;
|
|
@@ -542,6 +546,10 @@ export type EventAPIType = {
|
|
|
542
546
|
value: File;
|
|
543
547
|
}[]) => Promise<BlogPage>;
|
|
544
548
|
deletePortfolioBlogPage: (portfolioId: string, blogPostId: string) => Promise<Response>;
|
|
549
|
+
fetchColocatedEventsGroups: (accountId: string) => Promise<ResponsePaginationType<ColocatedEventsGroupType>>;
|
|
550
|
+
createColocatedEventsGroup: (accountId: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
|
|
551
|
+
editColocatedEventsGroup: (id: string, data: ColocatedEventsGroupInputType) => Promise<ColocatedEventsGroupType>;
|
|
552
|
+
deleteColocatedEventsGroup: (id: string) => Promise<Response>;
|
|
545
553
|
};
|
|
546
554
|
export type BaseAPIConfigType = {
|
|
547
555
|
baseUrl?: string;
|