@connectedxm/client 0.5.26 → 0.5.28

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/dist/index.d.mts CHANGED
@@ -585,29 +585,33 @@ declare const isTypeNotification: (notification: BaseNotification | Notification
585
585
  interface BaseCoupon {
586
586
  id: string;
587
587
  code: string;
588
- discountAmount: number;
589
- discountPercent: number;
588
+ eventId: string;
589
+ ticketId: string | null;
590
590
  ticket: BaseTicket | null;
591
+ prePaid: boolean;
592
+ active: boolean;
593
+ startDate: string | null;
594
+ endDate: string | null;
595
+ discountAmount: number | null;
596
+ discountPercent: number | null;
597
+ quantityMin: number | null;
598
+ quantityMax: number | null;
599
+ amountMin: number | null;
600
+ amountMax: number | null;
601
+ useLimit: number | null;
602
+ emailDomains: string | null;
603
+ createdAt: string;
604
+ updatedAt: string;
591
605
  }
592
606
  declare enum CouponType {
593
607
  order = "order",
594
608
  ticket = "ticket"
595
609
  }
596
610
  interface Coupon extends BaseCoupon {
597
- description: string | null;
611
+ description: string;
598
612
  }
599
613
  declare const isTypeCoupon: (coupon: BaseCoupon | Coupon) => coupon is Coupon;
600
614
  interface ManagedCoupon extends Coupon {
601
- active: boolean;
602
- startDate: string | null;
603
- endDate: string | null;
604
- quantityMin: number;
605
- quantityMax: number | null;
606
- amountMin: number;
607
- amountMax: number | null;
608
- useLimit: number | null;
609
- emailDomains: string | null;
610
- createdAt: string;
611
615
  _count: {
612
616
  registrations: number;
613
617
  };
@@ -2345,7 +2349,7 @@ interface GetSelfEventRegistrationCouponsProps extends InfiniteQueryParams {
2345
2349
  declare const GetSelfEventRegistrationCoupons: ({ eventId, registrationId, clientApiParams, queryClient, locale, }: GetSelfEventRegistrationCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
2346
2350
  declare const useGetSelfEventRegistrationCoupons: (eventId: string, registrationId: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSelfEventRegistrationCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2347
2351
 
2348
- declare const SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY: (eventId: string, registrationId: string) => QueryKey;
2352
+ declare const SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY: (eventId: string, registrationId: string, couponId: string) => QueryKey;
2349
2353
  interface GetSelfEventRegistrationCouponRegistrationsProps extends InfiniteQueryParams {
2350
2354
  eventId: string;
2351
2355
  registrationId: string;
package/dist/index.d.ts CHANGED
@@ -585,29 +585,33 @@ declare const isTypeNotification: (notification: BaseNotification | Notification
585
585
  interface BaseCoupon {
586
586
  id: string;
587
587
  code: string;
588
- discountAmount: number;
589
- discountPercent: number;
588
+ eventId: string;
589
+ ticketId: string | null;
590
590
  ticket: BaseTicket | null;
591
+ prePaid: boolean;
592
+ active: boolean;
593
+ startDate: string | null;
594
+ endDate: string | null;
595
+ discountAmount: number | null;
596
+ discountPercent: number | null;
597
+ quantityMin: number | null;
598
+ quantityMax: number | null;
599
+ amountMin: number | null;
600
+ amountMax: number | null;
601
+ useLimit: number | null;
602
+ emailDomains: string | null;
603
+ createdAt: string;
604
+ updatedAt: string;
591
605
  }
592
606
  declare enum CouponType {
593
607
  order = "order",
594
608
  ticket = "ticket"
595
609
  }
596
610
  interface Coupon extends BaseCoupon {
597
- description: string | null;
611
+ description: string;
598
612
  }
599
613
  declare const isTypeCoupon: (coupon: BaseCoupon | Coupon) => coupon is Coupon;
600
614
  interface ManagedCoupon extends Coupon {
601
- active: boolean;
602
- startDate: string | null;
603
- endDate: string | null;
604
- quantityMin: number;
605
- quantityMax: number | null;
606
- amountMin: number;
607
- amountMax: number | null;
608
- useLimit: number | null;
609
- emailDomains: string | null;
610
- createdAt: string;
611
615
  _count: {
612
616
  registrations: number;
613
617
  };
@@ -2345,7 +2349,7 @@ interface GetSelfEventRegistrationCouponsProps extends InfiniteQueryParams {
2345
2349
  declare const GetSelfEventRegistrationCoupons: ({ eventId, registrationId, clientApiParams, queryClient, locale, }: GetSelfEventRegistrationCouponsProps) => Promise<ConnectedXMResponse<Coupon[]>>;
2346
2350
  declare const useGetSelfEventRegistrationCoupons: (eventId: string, registrationId: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "clientApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSelfEventRegistrationCoupons>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Coupon[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
2347
2351
 
2348
- declare const SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY: (eventId: string, registrationId: string) => QueryKey;
2352
+ declare const SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY: (eventId: string, registrationId: string, couponId: string) => QueryKey;
2349
2353
  interface GetSelfEventRegistrationCouponRegistrationsProps extends InfiniteQueryParams {
2350
2354
  eventId: string;
2351
2355
  registrationId: string;
package/dist/index.js CHANGED
@@ -1011,7 +1011,7 @@ var isTypeCoupon = (coupon) => {
1011
1011
  return coupon.description !== void 0;
1012
1012
  };
1013
1013
  var isManagedCoupon = (coupon) => {
1014
- return coupon.active !== void 0;
1014
+ return coupon._count !== void 0;
1015
1015
  };
1016
1016
  var isTypeInstance = (instance) => {
1017
1017
  return instance.coupon !== void 0;
@@ -4980,9 +4980,13 @@ var useGetSelfEventRegistrationCoupon = (eventId = "", registrationId = "", coup
4980
4980
  };
4981
4981
 
4982
4982
  // src/queries/self/registration/useGetSelfEventRegistrationCouponRegistrations.ts
4983
- var SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY = (eventId, registrationId) => [
4984
- ...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId, registrationId),
4985
- "COUPONS"
4983
+ var SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY = (eventId, registrationId, couponId) => [
4984
+ ...SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY(
4985
+ eventId,
4986
+ registrationId,
4987
+ couponId
4988
+ ),
4989
+ "REGISTRATIONS"
4986
4990
  ];
4987
4991
  var GetSelfEventRegistrationCouponRegistrations = async ({
4988
4992
  eventId,
@@ -5002,7 +5006,8 @@ var useGetSelfEventRegistrationCouponRegistrations = (eventId = "", registration
5002
5006
  return useConnectedInfiniteQuery(
5003
5007
  SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY(
5004
5008
  eventId,
5005
- registrationId
5009
+ registrationId,
5010
+ couponId
5006
5011
  ),
5007
5012
  (params2) => GetSelfEventRegistrationCouponRegistrations({
5008
5013
  eventId,
package/dist/index.mjs CHANGED
@@ -247,7 +247,7 @@ var isTypeCoupon = (coupon) => {
247
247
  return coupon.description !== void 0;
248
248
  };
249
249
  var isManagedCoupon = (coupon) => {
250
- return coupon.active !== void 0;
250
+ return coupon._count !== void 0;
251
251
  };
252
252
  var isTypeInstance = (instance) => {
253
253
  return instance.coupon !== void 0;
@@ -4218,9 +4218,13 @@ var useGetSelfEventRegistrationCoupon = (eventId = "", registrationId = "", coup
4218
4218
  };
4219
4219
 
4220
4220
  // src/queries/self/registration/useGetSelfEventRegistrationCouponRegistrations.ts
4221
- var SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY = (eventId, registrationId) => [
4222
- ...SELF_EVENT_REGISTRATION_QUERY_KEY(eventId, registrationId),
4223
- "COUPONS"
4221
+ var SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY = (eventId, registrationId, couponId) => [
4222
+ ...SELF_EVENT_REGISTRATION_COUPON_QUERY_KEY(
4223
+ eventId,
4224
+ registrationId,
4225
+ couponId
4226
+ ),
4227
+ "REGISTRATIONS"
4224
4228
  ];
4225
4229
  var GetSelfEventRegistrationCouponRegistrations = async ({
4226
4230
  eventId,
@@ -4240,7 +4244,8 @@ var useGetSelfEventRegistrationCouponRegistrations = (eventId = "", registration
4240
4244
  return useConnectedInfiniteQuery(
4241
4245
  SELF_EVENT_REGISTRATION_COUPON_REGISTRATIONS_QUERY_KEY(
4242
4246
  eventId,
4243
- registrationId
4247
+ registrationId,
4248
+ couponId
4244
4249
  ),
4245
4250
  (params2) => GetSelfEventRegistrationCouponRegistrations({
4246
4251
  eventId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "0.5.26",
3
+ "version": "0.5.28",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {