@connectedxm/client 0.0.4 → 0.0.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @connectedxm/client-sdk
2
2
 
3
+ ## 0.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 8ec09a2: fix utilities export
8
+
3
9
  ## 0.0.4
4
10
 
5
11
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -1063,9 +1063,9 @@ interface Series extends BaseSeries {
1063
1063
 
1064
1064
  declare const AppendInfiniteQuery: (queryClient: QueryClient, key: Array<string>, newData: any) => void;
1065
1065
 
1066
- declare namespace AppendInfiniteQuery$1 {
1067
- export { AppendInfiniteQuery as default };
1068
- }
1066
+ declare const GetErrorMessage: (error: any, fallback?: string) => string;
1067
+
1068
+ declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
1069
1069
 
1070
1070
  interface ItemWithId {
1071
1071
  id: string;
@@ -1077,22 +1077,6 @@ interface ItemWithId {
1077
1077
  }
1078
1078
  declare const CacheIndividualQueries: <TData extends ItemWithId>(response: InfiniteData<ConnectedXMResponse<TData[]>>, queryClient: QueryClient, queryKeyFn: (id: string) => any, SET_FUNCTION: (client: QueryClient, keyParams: any, response: ConnectedXMResponse<TData>) => void, itemMap?: ((item: TData) => TData) | undefined) => void;
1079
1079
 
1080
- declare namespace CacheIndividualQueries$1 {
1081
- export { CacheIndividualQueries as default };
1082
- }
1083
-
1084
- declare const GetErrorMessage: (error: any, fallback?: string) => string;
1085
-
1086
- declare namespace GetErrorMessage$1 {
1087
- export { GetErrorMessage as default };
1088
- }
1089
-
1090
- declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
1091
-
1092
- declare namespace MergeInfinitePages$1 {
1093
- export { MergeInfinitePages as default };
1094
- }
1095
-
1096
1080
  declare const useSetAuthToken: () => (token?: string | undefined) => void;
1097
1081
 
1098
1082
  interface ConnectedXMProps {
@@ -1105,4 +1089,4 @@ interface ConnectedXMProps {
1105
1089
  }
1106
1090
  declare const ConnectedXM: ({ organizationId, apiUrl, token, executeAs, locale, children, }: ConnectedXMProps) => React.JSX.Element;
1107
1091
 
1108
- export { type Account, type AccountShare, type AccountTier, AccountType, type Activity, type Advertisement, type AdvertisementClick, AdvertisementType, type AdvertisementView, type Announcement, AppendInfiniteQuery$1 as AppendInfiniteQuery, type BaseAccount, type BaseAccountTier, type BaseActivity, type BaseAdvertisement, type BaseAnnouncement, type BaseBenefit, type BaseChatChannel, type BaseChatChannelMember, type BaseChatChannelMessage, type BaseCommunity, type BaseCommunityMembership, type BaseComplimentaryTicket, type BaseContent, type BaseContentType, type BaseCoupon, type BaseEvent, type BaseEventActivation, type BaseEventActivationCompletion, type BaseEventPage, type BaseFaq, type BaseFaqSection, type BaseImage, type BaseInstance, type BaseIntegrations, type BaseInterest, type BaseLead, type BaseLike, type BaseNotification, type BaseOrganization, type BasePage, type BasePurchase, type BaseRegistrationGuest, type BaseRegistrationPayment, type BaseRegistrationQuestion, type BaseRegistrationQuestionChoice, type BaseRegistrationQuestionResponse, type BaseRegistrationQuestionSearchValue, type BaseRegistrationSection, type BaseScan, type BaseSeries, type BaseSession, type BaseSpeaker, type BaseSponsorshipLevel, type BaseSupportTicket, type BaseSupportTicketNote, type BaseTeamMember, type BaseTicket, type BaseTrack, type BaseTransfer, type Benefit, CacheIndividualQueries$1 as CacheIndividualQueries, type ChatChannel, type ChatChannelMember, type ChatChannelMessage, type Community, CommunityAccess, type CommunityMembership, CommunityMembershipRole, type ComplimentaryTicket, ConnectedXM, type ConnectedXMResponse, type Content, type ContentType, ContentTypeFormat, type Coupon, CouponType, Currency, type Event, type EventActivation, type EventActivationCompletion, type EventAllowlistMember, type EventListing, type EventPage, EventSource, EventType, type Faq, type FaqSection, GetErrorMessage$1 as GetErrorMessage, type Image, ImageType, type Instance, type Integrations, type Interest, type Lead, type Like, type LinkPreview, type ManagedCoupon, type ManagedCouponOrder, MergeInfinitePages$1 as MergeInfinitePages, type Notification, type NotificationPreferences, NotificationType, type Order, type OrgMembership, type Organization, type Page, type Purchase, type PushDevice, PushDeviceAppType, PushService, type Registration, type RegistrationEventDetails, type RegistrationGuest, type RegistrationPayment, type RegistrationQuestion, type RegistrationQuestionChoice, type RegistrationQuestionResponse, type RegistrationQuestionSearchValue, RegistrationQuestionType, type RegistrationSection, type RegistrationSectionQuestion, RegistrationStatus, type Scan, type Self, type Series, type Session, type Speaker, type SponsorshipLevel, type StreamInput, type SupportTicket, type SupportTicketNote, SupportTicketType, type TeamMember, type Ticket, type TicketAllowlistMember, TicketEventAccessLevel, TicketVisibility, type Track, type Transfer, type User, isListing, isManagedCoupon, isSelf, isTypeAccount, isTypeAccountTier, isTypeActivity, isTypeAdvertisement, isTypeAnnouncement, isTypeBenefit, isTypeCommunity, isTypeCommunityMembership, isTypeContent, isTypeContentType, isTypeCoupon, isTypeEvent, isTypeEventActivation, isTypeEventActivationCompletion, isTypeEventPage, isTypeFaq, isTypeFaqSection, isTypeImage, isTypeInstance, isTypeIntegrations, isTypeLead, isTypeNotification, isTypeOrganization, isTypePurchase, isTypeScan, isTypeSession, isTypeSpeaker, isTypeSponsorshipLevel, isTypeSupportTicket, isTypeSupportTicketNote, isTypeTeamMember, isTypeTicket, isTypeTrack, isTypeTransfer, useSetAuthToken };
1092
+ export { type Account, type AccountShare, type AccountTier, AccountType, type Activity, type Advertisement, type AdvertisementClick, AdvertisementType, type AdvertisementView, type Announcement, AppendInfiniteQuery, type BaseAccount, type BaseAccountTier, type BaseActivity, type BaseAdvertisement, type BaseAnnouncement, type BaseBenefit, type BaseChatChannel, type BaseChatChannelMember, type BaseChatChannelMessage, type BaseCommunity, type BaseCommunityMembership, type BaseComplimentaryTicket, type BaseContent, type BaseContentType, type BaseCoupon, type BaseEvent, type BaseEventActivation, type BaseEventActivationCompletion, type BaseEventPage, type BaseFaq, type BaseFaqSection, type BaseImage, type BaseInstance, type BaseIntegrations, type BaseInterest, type BaseLead, type BaseLike, type BaseNotification, type BaseOrganization, type BasePage, type BasePurchase, type BaseRegistrationGuest, type BaseRegistrationPayment, type BaseRegistrationQuestion, type BaseRegistrationQuestionChoice, type BaseRegistrationQuestionResponse, type BaseRegistrationQuestionSearchValue, type BaseRegistrationSection, type BaseScan, type BaseSeries, type BaseSession, type BaseSpeaker, type BaseSponsorshipLevel, type BaseSupportTicket, type BaseSupportTicketNote, type BaseTeamMember, type BaseTicket, type BaseTrack, type BaseTransfer, type Benefit, CacheIndividualQueries, type ChatChannel, type ChatChannelMember, type ChatChannelMessage, type Community, CommunityAccess, type CommunityMembership, CommunityMembershipRole, type ComplimentaryTicket, ConnectedXM, type ConnectedXMResponse, type Content, type ContentType, ContentTypeFormat, type Coupon, CouponType, Currency, type Event, type EventActivation, type EventActivationCompletion, type EventAllowlistMember, type EventListing, type EventPage, EventSource, EventType, type Faq, type FaqSection, GetErrorMessage, type Image, ImageType, type Instance, type Integrations, type Interest, type Lead, type Like, type LinkPreview, type ManagedCoupon, type ManagedCouponOrder, MergeInfinitePages, type Notification, type NotificationPreferences, NotificationType, type Order, type OrgMembership, type Organization, type Page, type Purchase, type PushDevice, PushDeviceAppType, PushService, type Registration, type RegistrationEventDetails, type RegistrationGuest, type RegistrationPayment, type RegistrationQuestion, type RegistrationQuestionChoice, type RegistrationQuestionResponse, type RegistrationQuestionSearchValue, RegistrationQuestionType, type RegistrationSection, type RegistrationSectionQuestion, RegistrationStatus, type Scan, type Self, type Series, type Session, type Speaker, type SponsorshipLevel, type StreamInput, type SupportTicket, type SupportTicketNote, SupportTicketType, type TeamMember, type Ticket, type TicketAllowlistMember, TicketEventAccessLevel, TicketVisibility, type Track, type Transfer, type User, isListing, isManagedCoupon, isSelf, isTypeAccount, isTypeAccountTier, isTypeActivity, isTypeAdvertisement, isTypeAnnouncement, isTypeBenefit, isTypeCommunity, isTypeCommunityMembership, isTypeContent, isTypeContentType, isTypeCoupon, isTypeEvent, isTypeEventActivation, isTypeEventActivationCompletion, isTypeEventPage, isTypeFaq, isTypeFaqSection, isTypeImage, isTypeInstance, isTypeIntegrations, isTypeLead, isTypeNotification, isTypeOrganization, isTypePurchase, isTypeScan, isTypeSession, isTypeSpeaker, isTypeSponsorshipLevel, isTypeSupportTicket, isTypeSupportTicketNote, isTypeTeamMember, isTypeTicket, isTypeTrack, isTypeTransfer, useSetAuthToken };
package/dist/index.d.ts CHANGED
@@ -1063,9 +1063,9 @@ interface Series extends BaseSeries {
1063
1063
 
1064
1064
  declare const AppendInfiniteQuery: (queryClient: QueryClient, key: Array<string>, newData: any) => void;
1065
1065
 
1066
- declare namespace AppendInfiniteQuery$1 {
1067
- export { AppendInfiniteQuery as default };
1068
- }
1066
+ declare const GetErrorMessage: (error: any, fallback?: string) => string;
1067
+
1068
+ declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
1069
1069
 
1070
1070
  interface ItemWithId {
1071
1071
  id: string;
@@ -1077,22 +1077,6 @@ interface ItemWithId {
1077
1077
  }
1078
1078
  declare const CacheIndividualQueries: <TData extends ItemWithId>(response: InfiniteData<ConnectedXMResponse<TData[]>>, queryClient: QueryClient, queryKeyFn: (id: string) => any, SET_FUNCTION: (client: QueryClient, keyParams: any, response: ConnectedXMResponse<TData>) => void, itemMap?: ((item: TData) => TData) | undefined) => void;
1079
1079
 
1080
- declare namespace CacheIndividualQueries$1 {
1081
- export { CacheIndividualQueries as default };
1082
- }
1083
-
1084
- declare const GetErrorMessage: (error: any, fallback?: string) => string;
1085
-
1086
- declare namespace GetErrorMessage$1 {
1087
- export { GetErrorMessage as default };
1088
- }
1089
-
1090
- declare function MergeInfinitePages<TData>(data: InfiniteData<ConnectedXMResponse<TData[]>>): TData[];
1091
-
1092
- declare namespace MergeInfinitePages$1 {
1093
- export { MergeInfinitePages as default };
1094
- }
1095
-
1096
1080
  declare const useSetAuthToken: () => (token?: string | undefined) => void;
1097
1081
 
1098
1082
  interface ConnectedXMProps {
@@ -1105,4 +1089,4 @@ interface ConnectedXMProps {
1105
1089
  }
1106
1090
  declare const ConnectedXM: ({ organizationId, apiUrl, token, executeAs, locale, children, }: ConnectedXMProps) => React.JSX.Element;
1107
1091
 
1108
- export { type Account, type AccountShare, type AccountTier, AccountType, type Activity, type Advertisement, type AdvertisementClick, AdvertisementType, type AdvertisementView, type Announcement, AppendInfiniteQuery$1 as AppendInfiniteQuery, type BaseAccount, type BaseAccountTier, type BaseActivity, type BaseAdvertisement, type BaseAnnouncement, type BaseBenefit, type BaseChatChannel, type BaseChatChannelMember, type BaseChatChannelMessage, type BaseCommunity, type BaseCommunityMembership, type BaseComplimentaryTicket, type BaseContent, type BaseContentType, type BaseCoupon, type BaseEvent, type BaseEventActivation, type BaseEventActivationCompletion, type BaseEventPage, type BaseFaq, type BaseFaqSection, type BaseImage, type BaseInstance, type BaseIntegrations, type BaseInterest, type BaseLead, type BaseLike, type BaseNotification, type BaseOrganization, type BasePage, type BasePurchase, type BaseRegistrationGuest, type BaseRegistrationPayment, type BaseRegistrationQuestion, type BaseRegistrationQuestionChoice, type BaseRegistrationQuestionResponse, type BaseRegistrationQuestionSearchValue, type BaseRegistrationSection, type BaseScan, type BaseSeries, type BaseSession, type BaseSpeaker, type BaseSponsorshipLevel, type BaseSupportTicket, type BaseSupportTicketNote, type BaseTeamMember, type BaseTicket, type BaseTrack, type BaseTransfer, type Benefit, CacheIndividualQueries$1 as CacheIndividualQueries, type ChatChannel, type ChatChannelMember, type ChatChannelMessage, type Community, CommunityAccess, type CommunityMembership, CommunityMembershipRole, type ComplimentaryTicket, ConnectedXM, type ConnectedXMResponse, type Content, type ContentType, ContentTypeFormat, type Coupon, CouponType, Currency, type Event, type EventActivation, type EventActivationCompletion, type EventAllowlistMember, type EventListing, type EventPage, EventSource, EventType, type Faq, type FaqSection, GetErrorMessage$1 as GetErrorMessage, type Image, ImageType, type Instance, type Integrations, type Interest, type Lead, type Like, type LinkPreview, type ManagedCoupon, type ManagedCouponOrder, MergeInfinitePages$1 as MergeInfinitePages, type Notification, type NotificationPreferences, NotificationType, type Order, type OrgMembership, type Organization, type Page, type Purchase, type PushDevice, PushDeviceAppType, PushService, type Registration, type RegistrationEventDetails, type RegistrationGuest, type RegistrationPayment, type RegistrationQuestion, type RegistrationQuestionChoice, type RegistrationQuestionResponse, type RegistrationQuestionSearchValue, RegistrationQuestionType, type RegistrationSection, type RegistrationSectionQuestion, RegistrationStatus, type Scan, type Self, type Series, type Session, type Speaker, type SponsorshipLevel, type StreamInput, type SupportTicket, type SupportTicketNote, SupportTicketType, type TeamMember, type Ticket, type TicketAllowlistMember, TicketEventAccessLevel, TicketVisibility, type Track, type Transfer, type User, isListing, isManagedCoupon, isSelf, isTypeAccount, isTypeAccountTier, isTypeActivity, isTypeAdvertisement, isTypeAnnouncement, isTypeBenefit, isTypeCommunity, isTypeCommunityMembership, isTypeContent, isTypeContentType, isTypeCoupon, isTypeEvent, isTypeEventActivation, isTypeEventActivationCompletion, isTypeEventPage, isTypeFaq, isTypeFaqSection, isTypeImage, isTypeInstance, isTypeIntegrations, isTypeLead, isTypeNotification, isTypeOrganization, isTypePurchase, isTypeScan, isTypeSession, isTypeSpeaker, isTypeSponsorshipLevel, isTypeSupportTicket, isTypeSupportTicketNote, isTypeTeamMember, isTypeTicket, isTypeTrack, isTypeTransfer, useSetAuthToken };
1092
+ export { type Account, type AccountShare, type AccountTier, AccountType, type Activity, type Advertisement, type AdvertisementClick, AdvertisementType, type AdvertisementView, type Announcement, AppendInfiniteQuery, type BaseAccount, type BaseAccountTier, type BaseActivity, type BaseAdvertisement, type BaseAnnouncement, type BaseBenefit, type BaseChatChannel, type BaseChatChannelMember, type BaseChatChannelMessage, type BaseCommunity, type BaseCommunityMembership, type BaseComplimentaryTicket, type BaseContent, type BaseContentType, type BaseCoupon, type BaseEvent, type BaseEventActivation, type BaseEventActivationCompletion, type BaseEventPage, type BaseFaq, type BaseFaqSection, type BaseImage, type BaseInstance, type BaseIntegrations, type BaseInterest, type BaseLead, type BaseLike, type BaseNotification, type BaseOrganization, type BasePage, type BasePurchase, type BaseRegistrationGuest, type BaseRegistrationPayment, type BaseRegistrationQuestion, type BaseRegistrationQuestionChoice, type BaseRegistrationQuestionResponse, type BaseRegistrationQuestionSearchValue, type BaseRegistrationSection, type BaseScan, type BaseSeries, type BaseSession, type BaseSpeaker, type BaseSponsorshipLevel, type BaseSupportTicket, type BaseSupportTicketNote, type BaseTeamMember, type BaseTicket, type BaseTrack, type BaseTransfer, type Benefit, CacheIndividualQueries, type ChatChannel, type ChatChannelMember, type ChatChannelMessage, type Community, CommunityAccess, type CommunityMembership, CommunityMembershipRole, type ComplimentaryTicket, ConnectedXM, type ConnectedXMResponse, type Content, type ContentType, ContentTypeFormat, type Coupon, CouponType, Currency, type Event, type EventActivation, type EventActivationCompletion, type EventAllowlistMember, type EventListing, type EventPage, EventSource, EventType, type Faq, type FaqSection, GetErrorMessage, type Image, ImageType, type Instance, type Integrations, type Interest, type Lead, type Like, type LinkPreview, type ManagedCoupon, type ManagedCouponOrder, MergeInfinitePages, type Notification, type NotificationPreferences, NotificationType, type Order, type OrgMembership, type Organization, type Page, type Purchase, type PushDevice, PushDeviceAppType, PushService, type Registration, type RegistrationEventDetails, type RegistrationGuest, type RegistrationPayment, type RegistrationQuestion, type RegistrationQuestionChoice, type RegistrationQuestionResponse, type RegistrationQuestionSearchValue, RegistrationQuestionType, type RegistrationSection, type RegistrationSectionQuestion, RegistrationStatus, type Scan, type Self, type Series, type Session, type Speaker, type SponsorshipLevel, type StreamInput, type SupportTicket, type SupportTicketNote, SupportTicketType, type TeamMember, type Ticket, type TicketAllowlistMember, TicketEventAccessLevel, TicketVisibility, type Track, type Transfer, type User, isListing, isManagedCoupon, isSelf, isTypeAccount, isTypeAccountTier, isTypeActivity, isTypeAdvertisement, isTypeAnnouncement, isTypeBenefit, isTypeCommunity, isTypeCommunityMembership, isTypeContent, isTypeContentType, isTypeCoupon, isTypeEvent, isTypeEventActivation, isTypeEventActivationCompletion, isTypeEventPage, isTypeFaq, isTypeFaqSection, isTypeImage, isTypeInstance, isTypeIntegrations, isTypeLead, isTypeNotification, isTypeOrganization, isTypePurchase, isTypeScan, isTypeSession, isTypeSpeaker, isTypeSponsorshipLevel, isTypeSupportTicket, isTypeSupportTicketNote, isTypeTeamMember, isTypeTicket, isTypeTrack, isTypeTransfer, useSetAuthToken };
package/dist/index.js CHANGED
@@ -125,10 +125,10 @@ __export(src_exports, {
125
125
  return AdvertisementType;
126
126
  },
127
127
  AppendInfiniteQuery: function() {
128
- return AppendInfiniteQuery_exports;
128
+ return AppendInfiniteQuery;
129
129
  },
130
130
  CacheIndividualQueries: function() {
131
- return CacheIndividualQueries_exports;
131
+ return CacheIndividualQueries;
132
132
  },
133
133
  CommunityAccess: function() {
134
134
  return CommunityAccess;
@@ -155,13 +155,13 @@ __export(src_exports, {
155
155
  return EventType;
156
156
  },
157
157
  GetErrorMessage: function() {
158
- return GetErrorMessage_exports;
158
+ return GetErrorMessage;
159
159
  },
160
160
  ImageType: function() {
161
161
  return ImageType;
162
162
  },
163
163
  MergeInfinitePages: function() {
164
- return MergeInfinitePages_exports;
164
+ return MergeInfinitePages;
165
165
  },
166
166
  NotificationType: function() {
167
167
  return NotificationType;
@@ -535,12 +535,6 @@ var isTypeEventActivationCompletion = function(eventActivationCompletion) {
535
535
  return eventActivationCompletion.updatedAt !== void 0;
536
536
  };
537
537
  // src/utilities/AppendInfiniteQuery.ts
538
- var AppendInfiniteQuery_exports = {};
539
- __export(AppendInfiniteQuery_exports, {
540
- default: function() {
541
- return AppendInfiniteQuery_default;
542
- }
543
- });
544
538
  var AppendInfiniteQuery = function(queryClient, key, newData) {
545
539
  queryClient.setQueriesData(key, function(data) {
546
540
  var _data_pages_, _data_pages;
@@ -558,14 +552,26 @@ var AppendInfiniteQuery = function(queryClient, key, newData) {
558
552
  return data;
559
553
  });
560
554
  };
561
- var AppendInfiniteQuery_default = AppendInfiniteQuery;
562
- // src/utilities/CacheIndividualQueries.ts
563
- var CacheIndividualQueries_exports = {};
564
- __export(CacheIndividualQueries_exports, {
565
- default: function() {
566
- return CacheIndividualQueries_default;
555
+ // src/utilities/GetErrorMessage.ts
556
+ var import_axios = __toESM(require("axios"));
557
+ var GetErrorMessage = function(error) {
558
+ var fallback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Something went wrong";
559
+ var message = fallback;
560
+ if (import_axios.default.isAxiosError(error)) {
561
+ var _error_response_data, _error_response;
562
+ message = ((_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || message;
563
+ } else {
564
+ message = error.message;
567
565
  }
568
- });
566
+ return message;
567
+ };
568
+ // src/utilities/MergeInfinitePages.ts
569
+ function MergeInfinitePages(data) {
570
+ return data.pages.reduce(function(sessions, page) {
571
+ return _to_consumable_array(sessions).concat(_to_consumable_array(page.data));
572
+ }, []);
573
+ }
574
+ // src/utilities/CacheIndividualQueries.ts
569
575
  var CacheIndividualQueries = function(response, queryClient, queryKeyFn, SET_FUNCTION, itemMap) {
570
576
  response.pages.forEach(function(page) {
571
577
  page.data.forEach(function(item) {
@@ -596,40 +602,6 @@ var CacheIndividualQueries = function(response, queryClient, queryKeyFn, SET_FUN
596
602
  });
597
603
  });
598
604
  };
599
- var CacheIndividualQueries_default = CacheIndividualQueries;
600
- // src/utilities/GetErrorMessage.ts
601
- var GetErrorMessage_exports = {};
602
- __export(GetErrorMessage_exports, {
603
- default: function() {
604
- return GetErrorMessage_default;
605
- }
606
- });
607
- var import_axios = __toESM(require("axios"));
608
- var GetErrorMessage = function(error) {
609
- var fallback = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "Something went wrong";
610
- var message = fallback;
611
- if (import_axios.default.isAxiosError(error)) {
612
- var _error_response_data, _error_response;
613
- message = ((_error_response = error.response) === null || _error_response === void 0 ? void 0 : (_error_response_data = _error_response.data) === null || _error_response_data === void 0 ? void 0 : _error_response_data.message) || message;
614
- } else {
615
- message = error.message;
616
- }
617
- return message;
618
- };
619
- var GetErrorMessage_default = GetErrorMessage;
620
- // src/utilities/MergeInfinitePages.ts
621
- var MergeInfinitePages_exports = {};
622
- __export(MergeInfinitePages_exports, {
623
- default: function() {
624
- return MergeInfinitePages_default;
625
- }
626
- });
627
- function MergeInfinitePages(data) {
628
- return data.pages.reduce(function(sessions, page) {
629
- return _to_consumable_array(sessions).concat(_to_consumable_array(page.data));
630
- }, []);
631
- }
632
- var MergeInfinitePages_default = MergeInfinitePages;
633
605
  // src/hooks/useConnectedXM.ts
634
606
  var import_react2 = __toESM(require("react"));
635
607
  // src/Context.ts
package/dist/index.mjs CHANGED
@@ -1,9 +1,3 @@
1
- var __defProp = Object.defineProperty;
2
- var __export = (target, all) => {
3
- for (var name in all)
4
- __defProp(target, name, { get: all[name], enumerable: true });
5
- };
6
-
7
1
  // src/interfaces.ts
8
2
  var RegistrationStatus = /* @__PURE__ */ ((RegistrationStatus2) => {
9
3
  RegistrationStatus2["registered"] = "registered";
@@ -237,10 +231,6 @@ var isTypeEventActivationCompletion = (eventActivationCompletion) => {
237
231
  };
238
232
 
239
233
  // src/utilities/AppendInfiniteQuery.ts
240
- var AppendInfiniteQuery_exports = {};
241
- __export(AppendInfiniteQuery_exports, {
242
- default: () => AppendInfiniteQuery_default
243
- });
244
234
  var AppendInfiniteQuery = (queryClient, key, newData) => {
245
235
  queryClient.setQueriesData(key, (data) => {
246
236
  if (data?.pages?.[0]?.data) {
@@ -253,13 +243,30 @@ var AppendInfiniteQuery = (queryClient, key, newData) => {
253
243
  return data;
254
244
  });
255
245
  };
256
- var AppendInfiniteQuery_default = AppendInfiniteQuery;
246
+
247
+ // src/utilities/GetErrorMessage.ts
248
+ import axios from "axios";
249
+ var GetErrorMessage = (error, fallback = "Something went wrong") => {
250
+ let message = fallback;
251
+ if (axios.isAxiosError(error)) {
252
+ message = error.response?.data?.message || message;
253
+ } else {
254
+ message = error.message;
255
+ }
256
+ return message;
257
+ };
258
+
259
+ // src/utilities/MergeInfinitePages.ts
260
+ function MergeInfinitePages(data) {
261
+ return data.pages.reduce(
262
+ (sessions, page) => {
263
+ return [...sessions, ...page.data];
264
+ },
265
+ []
266
+ );
267
+ }
257
268
 
258
269
  // src/utilities/CacheIndividualQueries.ts
259
- var CacheIndividualQueries_exports = {};
260
- __export(CacheIndividualQueries_exports, {
261
- default: () => CacheIndividualQueries_default
262
- });
263
270
  var CacheIndividualQueries = (response, queryClient, queryKeyFn, SET_FUNCTION, itemMap) => {
264
271
  response.pages.forEach((page) => {
265
272
  page.data.forEach((item) => {
@@ -294,39 +301,6 @@ var CacheIndividualQueries = (response, queryClient, queryKeyFn, SET_FUNCTION, i
294
301
  });
295
302
  });
296
303
  };
297
- var CacheIndividualQueries_default = CacheIndividualQueries;
298
-
299
- // src/utilities/GetErrorMessage.ts
300
- var GetErrorMessage_exports = {};
301
- __export(GetErrorMessage_exports, {
302
- default: () => GetErrorMessage_default
303
- });
304
- import axios from "axios";
305
- var GetErrorMessage = (error, fallback = "Something went wrong") => {
306
- let message = fallback;
307
- if (axios.isAxiosError(error)) {
308
- message = error.response?.data?.message || message;
309
- } else {
310
- message = error.message;
311
- }
312
- return message;
313
- };
314
- var GetErrorMessage_default = GetErrorMessage;
315
-
316
- // src/utilities/MergeInfinitePages.ts
317
- var MergeInfinitePages_exports = {};
318
- __export(MergeInfinitePages_exports, {
319
- default: () => MergeInfinitePages_default
320
- });
321
- function MergeInfinitePages(data) {
322
- return data.pages.reduce(
323
- (sessions, page) => {
324
- return [...sessions, ...page.data];
325
- },
326
- []
327
- );
328
- }
329
- var MergeInfinitePages_default = MergeInfinitePages;
330
304
 
331
305
  // src/hooks/useConnectedXM.ts
332
306
  import React2 from "react";
@@ -380,8 +354,8 @@ var ConnectedXM = ({
380
354
  export {
381
355
  AccountType,
382
356
  AdvertisementType,
383
- AppendInfiniteQuery_exports as AppendInfiniteQuery,
384
- CacheIndividualQueries_exports as CacheIndividualQueries,
357
+ AppendInfiniteQuery,
358
+ CacheIndividualQueries,
385
359
  CommunityAccess,
386
360
  CommunityMembershipRole,
387
361
  ConnectedXM,
@@ -390,9 +364,9 @@ export {
390
364
  Currency,
391
365
  EventSource,
392
366
  EventType,
393
- GetErrorMessage_exports as GetErrorMessage,
367
+ GetErrorMessage,
394
368
  ImageType,
395
- MergeInfinitePages_exports as MergeInfinitePages,
369
+ MergeInfinitePages,
396
370
  NotificationType,
397
371
  PushDeviceAppType,
398
372
  PushService,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "0.0.4",
3
+ "version": "0.0.5",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "license": "MIT",