@hubs101/js-api-skd-client 1.0.10262 → 1.0.10264

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.
package/README.md CHANGED
@@ -16,8 +16,7 @@ Accessing API via stateless interface:
16
16
  `import { EventAPIProvider } from '@hubs101/js-api-skd-client';`
17
17
  2. Access api via hook:
18
18
  ` const { fetchAttendees } = useAPIContext();`
19
-
20
- \*\*First init or initWithToken needs to be called in order to have authentication setup.
19
+ \*\*First init or initWithToken needs to be called in order to have authentication setup.
21
20
 
22
21
  ## Creating new release
23
22
 
@@ -68,6 +68,7 @@ export declare const _fetchEventOptions: (basePath: string, token: string, event
68
68
  export declare const _assignPaymentAccount: (basePath: string, token: string, eventId: string, requestData: {
69
69
  payment_account: string;
70
70
  }) => Promise<any>;
71
+ export declare const _unassignPaymentAccount: (basePath: string, token: string, eventId: string, paymentAccountId: string) => Promise<any>;
71
72
  export declare const _createEvent: (basePath: string, token: string, data: any, files: {
72
73
  name: string;
73
74
  value: File;
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports._fetchEventBookings = exports._acceptInternTicket = exports._acceptTicket = exports._fetchTicketDetails = exports._assignTicket = exports._fetchMyBookings = exports._fetchEventGroups = exports._unpinExhibition = exports._pinExhibition = exports._unpinDocument = exports._pinDocument = exports._reportExhibitionAction = exports._deleteDocument = exports._updateDocument = exports._createDocument = exports._assignDocumentToEvent = exports._fetchEventDocuments = exports._fetchUserRegistrationsEvents = exports._fetchEventStreams = exports._fetchEventLocations = exports._deleteLocation = exports._updateLocation = exports._createLocation = exports._fetchExhibitionDetails = exports._deleteDiscount = exports._updateDiscount = exports._createDiscount = exports._fetchEventDiscounts = exports._deleteTicket = exports._updateTicket = exports._createTicket = exports._deleteOption = exports._updateOption = exports._createOption = exports._deleteGroup = exports._updateGroup = exports._createGroup = exports._importAgenda = exports._fetchAttendeesAvailabilities = exports._updateEventTemplates = exports._fetchEventTemplates = exports._fetchEventNotifications = exports._sendSingleNotification = exports._sendNotification = exports._fetchEventDetails = exports._fetchExhibitions = exports._fetchEventsForAccount = exports._fetchTickets = exports._fetchAccounts = exports._fetchEventRegistrations = void 0;
13
- exports._deleteExhibition = exports._updateExhibition = exports._importExhibition = exports._createExhibition = exports._fetchMyExhibitions = exports._fetchAllExhibitions = exports._deleteStream = exports._updateStream = exports._createStream = exports._fetchYoutubeContent = exports._fetchZoomContent = exports._createEvent = exports._assignPaymentAccount = exports._fetchEventOptions = exports._fetchEventTickets = exports._updateEvent = exports._deletePage = exports._updatePage = exports._createPage = exports._fetchEventPages = exports._updateAccountWithFiles = exports._fetchMySessions = exports._fetchEditableEvents = exports._fetchSpeakers = exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = void 0;
13
+ exports._deleteExhibition = exports._updateExhibition = exports._importExhibition = exports._createExhibition = exports._fetchMyExhibitions = exports._fetchAllExhibitions = exports._deleteStream = exports._updateStream = exports._createStream = exports._fetchYoutubeContent = exports._fetchZoomContent = exports._createEvent = exports._unassignPaymentAccount = exports._assignPaymentAccount = exports._fetchEventOptions = exports._fetchEventTickets = exports._updateEvent = exports._deletePage = exports._updatePage = exports._createPage = exports._fetchEventPages = exports._updateAccountWithFiles = exports._fetchMySessions = exports._fetchEditableEvents = exports._fetchSpeakers = exports._fetchAccountDetails = exports._eventInvitationRegistration = exports._createFreeTrialAccount = void 0;
14
14
  const api_1 = require("../../utils/api");
15
15
  const base_1 = require("../../utils/base");
16
16
  const _fetchEventRegistrations = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
@@ -418,6 +418,11 @@ const _assignPaymentAccount = (basePath, token, eventId, requestData) => __await
418
418
  return yield (0, api_1.postRequestWE)(`${base.EVENTS}/${eventId}/payment-accounts`, requestData, token);
419
419
  });
420
420
  exports._assignPaymentAccount = _assignPaymentAccount;
421
+ const _unassignPaymentAccount = (basePath, token, eventId, paymentAccountId) => __awaiter(void 0, void 0, void 0, function* () {
422
+ const base = (0, base_1.getBasePath)(basePath);
423
+ return yield (0, api_1.deleteRequestWE)(`${base.EVENTS}/${eventId}/payment-accounts/${paymentAccountId}`, token);
424
+ });
425
+ exports._unassignPaymentAccount = _unassignPaymentAccount;
421
426
  const _createEvent = (basePath, token, data, files) => __awaiter(void 0, void 0, void 0, function* () {
422
427
  const base = (0, base_1.getBasePath)(basePath);
423
428
  const { data: createdEvent } = yield (0, api_1.postFilesAndDataRequest)(base.EVENTS, data, files, token);
package/lib/index.js CHANGED
@@ -435,6 +435,10 @@ function EventAPIProvider(props) {
435
435
  (0, api_1.validateConfig)(config);
436
436
  return (0, event_1._assignPaymentAccount)(config.baseUrl, config.token, eventId, requestData);
437
437
  }), [config, config.baseUrl, config.token]);
438
+ const unassignPaymentAccount = (0, react_1.useCallback)((eventId, paymentAccountId) => __awaiter(this, void 0, void 0, function* () {
439
+ (0, api_1.validateConfig)(config);
440
+ return (0, event_1._unassignPaymentAccount)(config.baseUrl, config.token, eventId, paymentAccountId);
441
+ }), [config, config.baseUrl, config.token]);
438
442
  const fetchAttendeeProfile = react_1.default.useCallback((attendeeId) => __awaiter(this, void 0, void 0, function* () {
439
443
  (0, api_1.validateConfig)(config);
440
444
  return (0, attendee_1._fetchAttendeeProfile)(config.baseUrl, config.token, attendeeId);
@@ -877,6 +881,7 @@ function EventAPIProvider(props) {
877
881
  fetchEventTickets,
878
882
  fetchEventOptions,
879
883
  assignPaymentAccount,
884
+ unassignPaymentAccount,
880
885
  fetchAttendeeProfile,
881
886
  fetchAttendees,
882
887
  fetchMyUser,
@@ -1056,6 +1061,7 @@ exports.BaseAPI = {
1056
1061
  fetchEventTickets: event_1._fetchEventTickets,
1057
1062
  fetchEventOptions: event_1._fetchEventOptions,
1058
1063
  assignPaymentAccount: event_1._assignPaymentAccount,
1064
+ unassignPaymentAccount: event_1._unassignPaymentAccount,
1059
1065
  fetchAttendeeProfile: attendee_1._fetchAttendeeProfile,
1060
1066
  fetchAttendees: attendee_1._fetchAttendees,
1061
1067
  fetchMyUser: attendee_1._fetchMyUser,
@@ -161,6 +161,7 @@ export type BaseAPIType = {
161
161
  assignPaymentAccount: (basePath: string, token: string, eventId: string, requestData: {
162
162
  payment_account: string;
163
163
  }) => Promise<any>;
164
+ unassignPaymentAccount: (basePath: string, token: string, eventId: string, paymentAccountId: string) => Promise<any>;
164
165
  fetchAttendeeProfile: (basePath: string, token: string, attendeeId: string) => Promise<AttendeeProfile>;
165
166
  fetchAttendees: (basePath: string, token: string, eventId: string) => Promise<AttendeeProfile[]>;
166
167
  fetchMyUser: (basePath: string, token: string) => Promise<AttendeeProfile>;
@@ -356,6 +357,7 @@ export type EventAPIType = {
356
357
  assignPaymentAccount: (eventId: string, requestData: {
357
358
  payment_account: string;
358
359
  }) => Promise<any>;
360
+ unassignPaymentAccount: (eventId: string, paymentAccountId: string) => Promise<any>;
359
361
  fetchEventTickets: (eventId: string) => Promise<TicketServerResponse[]>;
360
362
  fetchEventOptions: (eventId: string) => Promise<OptionServerResponse[]>;
361
363
  fetchAttendeeProfile: (attendeeId: string) => Promise<AttendeeProfile>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10262",
3
+ "version": "1.0.10264",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",