@hubs101/js-api-skd-client 1.0.10405 → 1.0.10409

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.
@@ -37,6 +37,17 @@ export type GroupResponseType = {
37
37
  list: string[];
38
38
  event: string;
39
39
  };
40
+ export type PublicGroupResponseType<T> = {
41
+ id: string;
42
+ name: string;
43
+ type: GroupType;
44
+ account: string;
45
+ style: string;
46
+ order: number;
47
+ slug: string;
48
+ list: T[];
49
+ event: string;
50
+ };
40
51
  export type GroupInputType = {
41
52
  name: string;
42
53
  type: GroupType;
@@ -1,3 +1,4 @@
1
+ import { PublicGroupResponseType } from "../authentication/types";
1
2
  import { Exhibition } from "../event/types";
2
3
  import { Session } from "../sessions/types";
3
4
  import { PublicEventItem, ResponsePaginationType } from "./types";
@@ -5,3 +6,4 @@ export declare const _fetchAllPublicEvents: (basePath: string, nbPage?: number,
5
6
  export declare const _fetchPublicExhibitions: (basePath: string, eventId: string, nbPage?: number, params?: string) => Promise<ResponsePaginationType<Exhibition>>;
6
7
  export declare const _fetchPublicAgenda: (basePath: string, eventId: string, nbPage?: number, params?: string) => Promise<ResponsePaginationType<Session>>;
7
8
  export declare const _getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
9
+ export declare const _getPublicGroupDetails: <T>(basePath: string, groupId: string) => Promise<PublicGroupResponseType<T>>;
@@ -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._getPublicRegistrationForm = exports._fetchPublicAgenda = exports._fetchPublicExhibitions = exports._fetchAllPublicEvents = void 0;
12
+ exports._getPublicGroupDetails = exports._getPublicRegistrationForm = exports._fetchPublicAgenda = exports._fetchPublicExhibitions = exports._fetchAllPublicEvents = void 0;
13
13
  const api_1 = require("../../utils/api");
14
14
  const base_1 = require("../../utils/base");
15
15
  const _fetchAllPublicEvents = (basePath, nbPage, params) => __awaiter(void 0, void 0, void 0, function* () {
@@ -60,3 +60,9 @@ const _getPublicRegistrationForm = (basePath, eventId) => __awaiter(void 0, void
60
60
  return data;
61
61
  });
62
62
  exports._getPublicRegistrationForm = _getPublicRegistrationForm;
63
+ const _getPublicGroupDetails = (basePath, groupId) => __awaiter(void 0, void 0, void 0, function* () {
64
+ const base = (0, base_1.getBasePath)(basePath);
65
+ const groups = yield (0, api_1.getRequest)(`${base.PUBLIC_GROUPS}/${groupId}`);
66
+ return groups;
67
+ });
68
+ exports._getPublicGroupDetails = _getPublicGroupDetails;
package/lib/index.js CHANGED
@@ -196,7 +196,11 @@ function EventAPIProvider(props) {
196
196
  const getPublicRegistrationForm = (0, react_1.useCallback)((eventId) => __awaiter(this, void 0, void 0, function* () {
197
197
  (0, api_1.validateConfig)(config);
198
198
  return (0, public_1._getPublicRegistrationForm)(config.baseUrl, eventId);
199
- }), [config, config.baseUrl, config.token]);
199
+ }), [config, config.baseUrl]);
200
+ const getPublicGroupDetails = (0, react_1.useCallback)((groupId) => __awaiter(this, void 0, void 0, function* () {
201
+ (0, api_1.validateConfig)(config);
202
+ return (0, public_1._getPublicGroupDetails)(config.baseUrl, groupId);
203
+ }), [config, config.baseUrl]);
200
204
  const fetchMyBookings = (0, react_1.useCallback)(() => __awaiter(this, void 0, void 0, function* () {
201
205
  (0, api_1.validateConfig)(config);
202
206
  return (0, event_1._fetchMyBookings)(config.baseUrl, config.token);
@@ -1091,6 +1095,7 @@ function EventAPIProvider(props) {
1091
1095
  fetchBlogPages,
1092
1096
  createBlogPage,
1093
1097
  createAccountGroup,
1098
+ getPublicGroupDetails,
1094
1099
  } }, props.children));
1095
1100
  }
1096
1101
  exports.EventAPIProvider = EventAPIProvider;
@@ -1298,5 +1303,6 @@ exports.BaseAPI = {
1298
1303
  fetchBlogPages: event_1._fetchBlogPages,
1299
1304
  createBlogPage: event_1._createBlogPage,
1300
1305
  createAccountGroup: authentication_1._createAccountGroup,
1306
+ getPublicGroupDetails: public_1._getPublicGroupDetails,
1301
1307
  };
1302
1308
  exports.useAPIContext = EventAPIContext_1.useAPIContext;
@@ -1,5 +1,5 @@
1
1
  import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNotification } from "../api/attendee/types";
2
- import { GroupInputType, GroupResponseType, RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
2
+ import { 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";
@@ -58,6 +58,7 @@ export type ClientBase = {
58
58
  TICKETS: string;
59
59
  DISCOUNTS: string;
60
60
  PUBLIC_EVENTS: string;
61
+ PUBLIC_GROUPS: string;
61
62
  LOCATIONS: string;
62
63
  PAGES: string;
63
64
  PAYMENT_ACCOUNTS: string;
@@ -299,6 +300,7 @@ export type BaseAPIType = {
299
300
  }[]) => Promise<BlogPage>;
300
301
  fetchBlogPages: (basePath: string, token: string, accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
301
302
  createAccountGroup: (basePath: string, token: string, accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
303
+ getPublicGroupDetails: <T>(basePath: string, groupId: string) => Promise<PublicGroupResponseType<T>>;
302
304
  };
303
305
  export type EventAPIType = {
304
306
  config: BaseAPIConfigType;
@@ -527,6 +529,7 @@ export type EventAPIType = {
527
529
  }[]) => Promise<BlogPage>;
528
530
  fetchBlogPages: (accountId: string, portfolioId?: string) => Promise<BlogPage[]>;
529
531
  createAccountGroup: (accountId: string, data: GroupInputType) => Promise<GroupResponseType>;
532
+ getPublicGroupDetails: <T>(groupId: string) => Promise<PublicGroupResponseType<T>>;
530
533
  };
531
534
  export type BaseAPIConfigType = {
532
535
  baseUrl?: string;
package/lib/utils/base.js CHANGED
@@ -65,6 +65,7 @@ const getBasePath = (basePath) => {
65
65
  PUBLIC_TICKETS: `${publicBasePath}/tickets`,
66
66
  BOOKINGS: `${authorizedBasePath}/bookings`,
67
67
  PUBLIC_BOOKINGS: `${unauthorizedBasePath}/bookings`,
68
+ PUBLIC_GROUPS: `${unauthorizedBasePath}/groups`,
68
69
  ACTIONS_EVENTS: `${authorizedBasePath}/actions/events`,
69
70
  ACTIONS_ATTENDEE: `${authorizedBasePath}/actions/attendees`,
70
71
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10405",
3
+ "version": "1.0.10409",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",