@hubs101/js-api-skd-client 1.0.10325 → 1.0.10326

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,6 +1,6 @@
1
1
  import { ResponsePaginationType, ResponseServerType } from "../public/types";
2
2
  import { ExhibitionReport, FetchCurrentEventAttendeesActionsResponse } from "../types";
3
- import { Account, AccountInput, Booking, BookingDetails, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
3
+ import { Account, AccountInput, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "./types";
4
4
  export declare const _fetchEventRegistrations: (basePath: string, token: string, eventId: string) => Promise<EventRegistration[]>;
5
5
  export declare const _fetchAccounts: (basePath: string, token: string) => Promise<Account[]>;
6
6
  export declare const _fetchTickets: (basePath: string, token: string) => Promise<ResponsePaginationType<BookingDetails>>;
@@ -23,7 +23,7 @@ export declare const _deleteOption: (basePath: string, token: string, optionId:
23
23
  export declare const _createTicket: (basePath: string, token: string, data: any) => Promise<any>;
24
24
  export declare const _updateTicket: (basePath: string, token: string, ticketId: string, data: any) => Promise<any>;
25
25
  export declare const _deleteTicket: (basePath: string, token: string, ticketId: string) => Promise<any>;
26
- export declare const _fetchEventDiscounts: (basePath: string, token: string, eventId: string) => Promise<any>;
26
+ export declare const _fetchEventDiscounts: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<DiscountServerResponse>>;
27
27
  export declare const _createDiscount: (basePath: string, token: string, data: any) => Promise<any>;
28
28
  export declare const _updateDiscount: (basePath: string, token: string, discountId: string, data: any) => Promise<any>;
29
29
  export declare const _deleteDiscount: (basePath: string, token: string, discountId: string) => Promise<any>;
@@ -149,7 +149,7 @@ const _deleteTicket = (basePath, token, ticketId) => __awaiter(void 0, void 0, v
149
149
  exports._deleteTicket = _deleteTicket;
150
150
  const _fetchEventDiscounts = (basePath, token, eventId) => __awaiter(void 0, void 0, void 0, function* () {
151
151
  const base = (0, base_1.getBasePath)(basePath);
152
- const { data: discounts } = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/discounts`, token);
152
+ const discounts = yield (0, api_1.getRequest)(`${base.EVENTS}/${eventId}/discounts?limit=2000`, token);
153
153
  return discounts;
154
154
  });
155
155
  exports._fetchEventDiscounts = _fetchEventDiscounts;
@@ -738,4 +738,22 @@ export type BookingsFormInput = {
738
738
  contact_phone: string;
739
739
  po_number: string;
740
740
  };
741
+ export type DiscountServerResponse = {
742
+ id: string;
743
+ name: string;
744
+ event: string;
745
+ code: string;
746
+ category: string;
747
+ value: number;
748
+ max_ticket: number;
749
+ min_ticket: number;
750
+ available_quantity: number;
751
+ used_quantity: number;
752
+ privileged_user: string[];
753
+ active: boolean;
754
+ activated_at: null | string;
755
+ valid_from: null | string;
756
+ expire_at: null | string;
757
+ updated_at: string;
758
+ };
741
759
  export {};
@@ -2,7 +2,7 @@ import { Attendee, AttendeeInput, AttendeeProfile, Note, NoteUpdateInput, UserNo
2
2
  import { RegisterManagerInput, ResponseAccountEventsType } from "../api/authentication/types";
3
3
  import { CalendarEvent } from "../api/calendar/types";
4
4
  import { LoginResponse, SendResetPasswordBody } from "../api/context/types";
5
- import { Account, AccountInput, Answer, Booking, BookingDetails, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
5
+ import { Account, AccountInput, Answer, Booking, BookingDetails, DiscountServerResponse, DocumentType, Event, EventLocation, EventRegistration, EventServerResponse, EventStream, Exhibition, ExhibitionInput, GroupServerResponse, OptionServerResponse, Stream, StreamInput, TicketServerResponse, UserRegistrationsEvent, ZoomParams } from "../api/event/types";
6
6
  import { EventMeetingStatisticsItem, MeetingItem } from "../api/meetings/types";
7
7
  import { Page } from "../api/pages/types";
8
8
  import { CommentBody, Post, PostBody, UpdatePostBody } from "../api/posts/types";
@@ -149,7 +149,7 @@ export type BaseAPIType = {
149
149
  deleteDiscount: (basePath: string, token: string, discountId: string) => Promise<any>;
150
150
  updateDiscount: (basePath: string, token: string, discountId: string, data: any) => Promise<any>;
151
151
  createDiscount: (basePath: string, token: string, data: any) => Promise<any>;
152
- fetchEventDiscounts: (basePath: string, token: string, eventId: string) => Promise<any>;
152
+ fetchEventDiscounts: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<DiscountServerResponse>>;
153
153
  deleteTicket: (basePath: string, token: string, ticketId: string) => Promise<any>;
154
154
  updateTicket: (basePath: string, token: string, ticketId: string, data: any) => Promise<any>;
155
155
  createTicket: (basePath: string, token: string, data: any) => Promise<any>;
@@ -359,7 +359,7 @@ export type EventAPIType = {
359
359
  deleteDiscount: (discountId: string) => Promise<any>;
360
360
  updateDiscount: (discountId: string, data: any) => Promise<any>;
361
361
  createDiscount: (data: any) => Promise<any>;
362
- fetchEventDiscounts: (eventId: string) => Promise<any>;
362
+ fetchEventDiscounts: (eventId: string) => Promise<ResponsePaginationType<DiscountServerResponse>>;
363
363
  deleteTicket: (ticketId: string) => Promise<any>;
364
364
  updateTicket: (ticketId: string, data: any) => Promise<any>;
365
365
  createTicket: (data: any) => Promise<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubs101/js-api-skd-client",
3
- "version": "1.0.10325",
3
+ "version": "1.0.10326",
4
4
  "author": "Liveware",
5
5
  "scripts": {
6
6
  "test": "jest --config jestconfig.json",