@connectedxm/client 0.5.13 → 0.5.15

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.mjs CHANGED
@@ -220,7 +220,7 @@ var isTypeTicket = (ticket) => {
220
220
  return ticket.visibility !== void 0;
221
221
  };
222
222
  var isTypePurchase = (purchase) => {
223
- return purchase.createdAt !== void 0;
223
+ return purchase.updatedAt !== void 0;
224
224
  };
225
225
  var isTypeTransfer = (transfer) => {
226
226
  return transfer.createdAt !== void 0;
@@ -5099,7 +5099,7 @@ var useGetSelfEventListingsRegistrations = (eventId, status, params = {}, option
5099
5099
  };
5100
5100
 
5101
5101
  // src/queries/listings/useGetListingRegistration.ts
5102
- var LISTING_REGISTRATION_QUERY_KEY = (eventId, registrationId) => [LISTING_REGISTRATIONS_QUERY_KEY(eventId), registrationId];
5102
+ var LISTING_REGISTRATION_QUERY_KEY = (eventId, registrationId) => [...LISTING_REGISTRATIONS_QUERY_KEY(eventId), registrationId];
5103
5103
  var SET_LISTING_REGISTRATION_QUERY_KEY = (client, keyParams, response, baseKeys = ["en"]) => {
5104
5104
  client.setQueryData(
5105
5105
  [
@@ -5131,6 +5131,78 @@ var useGetSelfEventListingRegistration = (eventId = "", registrationId = "", opt
5131
5131
  );
5132
5132
  };
5133
5133
 
5134
+ // src/queries/listings/useGetListingPurchases.ts
5135
+ var LISTING_PURCHASES_QUERY_KEY = (eventId, checkedIn) => [
5136
+ ...LISTING_QUERY_KEY(eventId),
5137
+ "PURCHASES",
5138
+ typeof checkedIn !== "undefined" ? checkedIn : "ALL"
5139
+ ];
5140
+ var GetSelfEventListingPurchases = async ({
5141
+ eventId,
5142
+ checkedIn,
5143
+ pageParam,
5144
+ pageSize,
5145
+ orderBy,
5146
+ search,
5147
+ clientApiParams
5148
+ }) => {
5149
+ const clientApi = await GetClientAPI(clientApiParams);
5150
+ const { data } = await clientApi.get(`/listings/${eventId}/purchases`, {
5151
+ params: {
5152
+ page: pageParam || void 0,
5153
+ pageSize: pageSize || void 0,
5154
+ orderBy: orderBy || void 0,
5155
+ search: search || void 0,
5156
+ checkedIn
5157
+ }
5158
+ });
5159
+ return data;
5160
+ };
5161
+ var useGetSelfEventListingPurchases = (eventId, checkedIn, params = {}, options = {}) => {
5162
+ return useConnectedInfiniteQuery(
5163
+ LISTING_PURCHASES_QUERY_KEY(eventId, checkedIn),
5164
+ (params2) => GetSelfEventListingPurchases({ eventId, checkedIn, ...params2 }),
5165
+ params,
5166
+ {
5167
+ ...options,
5168
+ enabled: !!eventId && (options?.enabled ?? true)
5169
+ }
5170
+ );
5171
+ };
5172
+
5173
+ // src/queries/listings/useGetListingPurchase.ts
5174
+ var LISTING_PURCHASE_QUERY_KEY = (eventId, purchaseId) => [...LISTING_PURCHASES_QUERY_KEY(eventId), purchaseId];
5175
+ var SET_LISTING_PURCHASE_QUERY_KEY = (client, keyParams, response, baseKeys = ["en"]) => {
5176
+ client.setQueryData(
5177
+ [
5178
+ ...LISTING_PURCHASE_QUERY_KEY(...keyParams),
5179
+ ...GetBaseSingleQueryKeys(...baseKeys)
5180
+ ],
5181
+ response
5182
+ );
5183
+ };
5184
+ var GetSelfEventListingPurchase = async ({
5185
+ eventId,
5186
+ purchaseId,
5187
+ clientApiParams
5188
+ }) => {
5189
+ const clientApi = await GetClientAPI(clientApiParams);
5190
+ const { data } = await clientApi.get(
5191
+ `/listings/${eventId}/purchases/${purchaseId}`
5192
+ );
5193
+ return data;
5194
+ };
5195
+ var useGetSelfEventListingPurchase = (eventId = "", purchaseId = "", options = {}) => {
5196
+ return useConnectedSingleQuery(
5197
+ LISTING_PURCHASE_QUERY_KEY(eventId, purchaseId),
5198
+ (params) => GetSelfEventListingPurchase({ eventId, purchaseId, ...params }),
5199
+ {
5200
+ ...options,
5201
+ enabled: !!eventId && !!purchaseId
5202
+ }
5203
+ );
5204
+ };
5205
+
5134
5206
  // src/queries/listings/useGetListingCoHosts.ts
5135
5207
  var LISTING_CO_HOSTS_QUERY_KEY = (eventId) => [
5136
5208
  ...LISTING_QUERY_KEY(eventId),
@@ -5167,6 +5239,79 @@ var useGetSelfEventListingCoHosts = (eventId, params = {}, options = {}) => {
5167
5239
  );
5168
5240
  };
5169
5241
 
5242
+ // src/queries/listings/useGetListingReport.ts
5243
+ var LISTING_REPORT_QUERY_KEY = (eventId) => [
5244
+ ...LISTING_QUERY_KEY(eventId),
5245
+ "REPORT"
5246
+ ];
5247
+ var GetSelfEventListingReport = async ({
5248
+ eventId,
5249
+ clientApiParams
5250
+ }) => {
5251
+ const clientApi = await GetClientAPI(clientApiParams);
5252
+ const { data } = await clientApi.get(`/listings/${eventId}/report`);
5253
+ return data;
5254
+ };
5255
+ var useGetSelfEventListingReport = (eventId, options = {}) => {
5256
+ return useConnectedSingleQuery(
5257
+ LISTING_REPORT_QUERY_KEY(eventId),
5258
+ (params) => GetSelfEventListingReport({ eventId, ...params }),
5259
+ {
5260
+ ...options,
5261
+ enabled: !!eventId && (options?.enabled ?? true)
5262
+ }
5263
+ );
5264
+ };
5265
+
5266
+ // src/queries/listings/useGetListingRegistrationPurchaseSections.ts
5267
+ var LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY = (eventId, registrationId, purchaseId) => [
5268
+ ...LISTING_REGISTRATION_QUERY_KEY(eventId, registrationId),
5269
+ purchaseId,
5270
+ "SECTIONS"
5271
+ ];
5272
+ var SET_LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
5273
+ client.setQueryData(
5274
+ [
5275
+ ...LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(...keyParams),
5276
+ ...GetBaseSingleQueryKeys(...baseKeys)
5277
+ ],
5278
+ response
5279
+ );
5280
+ };
5281
+ var GetListingRegistrationPurchaseSections = async ({
5282
+ eventId,
5283
+ registrationId,
5284
+ purchaseId,
5285
+ clientApiParams
5286
+ }) => {
5287
+ const clientApi = await GetClientAPI(clientApiParams);
5288
+ const { data } = await clientApi.get(
5289
+ `/listings/${eventId}/registrations/${registrationId}/purchases/${purchaseId}`,
5290
+ {}
5291
+ );
5292
+ return data;
5293
+ };
5294
+ var useGetListingRegistrationPurchaseSections = (eventId, registrationId, purchaseId, options = {}) => {
5295
+ return useConnectedSingleQuery_default(
5296
+ LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
5297
+ eventId,
5298
+ registrationId,
5299
+ purchaseId
5300
+ ),
5301
+ (params) => GetListingRegistrationPurchaseSections({
5302
+ eventId,
5303
+ registrationId,
5304
+ purchaseId,
5305
+ ...params
5306
+ }),
5307
+ {
5308
+ retry: false,
5309
+ ...options,
5310
+ enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
5311
+ }
5312
+ );
5313
+ };
5314
+
5170
5315
  // src/queries/interests/useGetInterests.ts
5171
5316
  var INTERESTS_QUERY_KEY = () => ["INTERESTS"];
5172
5317
  var SET_INTERESTS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
@@ -7687,6 +7832,12 @@ var CheckinListingRegistrationPurchase = async ({
7687
7832
  queryClient.invalidateQueries({
7688
7833
  queryKey: LISTING_REGISTRATION_QUERY_KEY(eventId, registrationId)
7689
7834
  });
7835
+ queryClient.invalidateQueries({
7836
+ queryKey: LISTING_PURCHASES_QUERY_KEY(eventId)
7837
+ });
7838
+ queryClient.invalidateQueries({
7839
+ queryKey: LISTING_PURCHASE_QUERY_KEY(eventId, purchaseId)
7840
+ });
7690
7841
  }
7691
7842
  return data;
7692
7843
  };
@@ -7694,6 +7845,38 @@ var useCheckinListingRegistrationPurchase = (options = {}) => {
7694
7845
  return useConnectedMutation_default(CheckinListingRegistrationPurchase, options);
7695
7846
  };
7696
7847
 
7848
+ // src/mutations/listings/useUndoCheckinListingRegistrationPurchase.ts
7849
+ var UndoCheckinListingRegistrationPurchase = async ({
7850
+ eventId,
7851
+ registrationId,
7852
+ purchaseId,
7853
+ clientApiParams,
7854
+ queryClient
7855
+ }) => {
7856
+ const clientApi = await GetClientAPI(clientApiParams);
7857
+ const { data } = await clientApi.delete(
7858
+ `/listings/${eventId}/registrations/${registrationId}/purchases/${purchaseId}`
7859
+ );
7860
+ if (queryClient && data.status === "ok") {
7861
+ queryClient.invalidateQueries({
7862
+ queryKey: LISTING_REGISTRATIONS_QUERY_KEY(eventId)
7863
+ });
7864
+ queryClient.invalidateQueries({
7865
+ queryKey: LISTING_REGISTRATION_QUERY_KEY(eventId, registrationId)
7866
+ });
7867
+ queryClient.invalidateQueries({
7868
+ queryKey: LISTING_PURCHASES_QUERY_KEY(eventId)
7869
+ });
7870
+ queryClient.invalidateQueries({
7871
+ queryKey: LISTING_PURCHASE_QUERY_KEY(eventId, purchaseId)
7872
+ });
7873
+ }
7874
+ return data;
7875
+ };
7876
+ var useUndoCheckinListingRegistrationPurchase = (options = {}) => {
7877
+ return useConnectedMutation_default(UndoCheckinListingRegistrationPurchase, options);
7878
+ };
7879
+
7697
7880
  // src/mutations/listings/useUpdateListing.ts
7698
7881
  var UpdateListing = async ({
7699
7882
  eventId,
@@ -7871,6 +8054,72 @@ var RemoveListingCoHost = async ({
7871
8054
  var useRemoveListingCoHost = (options = {}) => {
7872
8055
  return useConnectedMutation_default(RemoveListingCoHost, options);
7873
8056
  };
8057
+
8058
+ // src/mutations/listings/useUpdateListingRegistrationPurchaseResponses.ts
8059
+ var UpdateListingRegistrationPurchaseResponses = async ({
8060
+ eventId,
8061
+ registrationId,
8062
+ purchaseId,
8063
+ questions,
8064
+ clientApiParams,
8065
+ queryClient
8066
+ }) => {
8067
+ const clientApi = await GetClientAPI(clientApiParams);
8068
+ const { data } = await clientApi.put(
8069
+ `/listings/${eventId}/registrations/${registrationId}/purchases/${purchaseId}`,
8070
+ {
8071
+ questions
8072
+ }
8073
+ );
8074
+ if (queryClient && data.status === "ok") {
8075
+ queryClient.invalidateQueries({
8076
+ queryKey: LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
8077
+ eventId,
8078
+ registrationId,
8079
+ purchaseId
8080
+ )
8081
+ });
8082
+ queryClient.invalidateQueries({
8083
+ queryKey: LISTING_REGISTRATIONS_QUERY_KEY(eventId)
8084
+ });
8085
+ queryClient.invalidateQueries({
8086
+ queryKey: LISTING_REGISTRATION_QUERY_KEY(eventId, registrationId)
8087
+ });
8088
+ queryClient.invalidateQueries({
8089
+ queryKey: LISTING_PURCHASES_QUERY_KEY(eventId)
8090
+ });
8091
+ queryClient.invalidateQueries({
8092
+ queryKey: LISTING_PURCHASE_QUERY_KEY(eventId, purchaseId)
8093
+ });
8094
+ queryClient.invalidateQueries({
8095
+ queryKey: LISTING_REPORT_QUERY_KEY(eventId)
8096
+ });
8097
+ }
8098
+ return data;
8099
+ };
8100
+ var useUpdateListingRegistrationPurchaseResponses = (options = {}) => {
8101
+ return useConnectedMutation_default(UpdateListingRegistrationPurchaseResponses, options);
8102
+ };
8103
+
8104
+ // src/mutations/storage/useUploadFile.ts
8105
+ var UploadFile = async ({
8106
+ clientApiParams,
8107
+ dataUri,
8108
+ name
8109
+ }) => {
8110
+ const clientApi = await GetClientAPI(clientApiParams);
8111
+ const { data } = await clientApi.post(
8112
+ `/storage/files`,
8113
+ {
8114
+ dataUri,
8115
+ name
8116
+ }
8117
+ );
8118
+ return data;
8119
+ };
8120
+ var useUploadFile = (options = {}) => {
8121
+ return useConnectedMutation_default(UploadFile, options);
8122
+ };
7874
8123
  export {
7875
8124
  ACCOUNTS_QUERY_KEY,
7876
8125
  ACCOUNT_ACTIVITIES_QUERY_KEY,
@@ -8043,6 +8292,7 @@ export {
8043
8292
  GetLevel,
8044
8293
  GetLevelSponsors,
8045
8294
  GetLevels,
8295
+ GetListingRegistrationPurchaseSections,
8046
8296
  GetOrganization,
8047
8297
  GetOrganizationExplore,
8048
8298
  GetOrganizationPage,
@@ -8062,9 +8312,12 @@ export {
8062
8312
  GetSelfEventListingAnnouncements,
8063
8313
  GetSelfEventListingCoHosts,
8064
8314
  GetSelfEventListingEmail,
8315
+ GetSelfEventListingPurchase,
8316
+ GetSelfEventListingPurchases,
8065
8317
  GetSelfEventListingQuestions,
8066
8318
  GetSelfEventListingRegistration,
8067
8319
  GetSelfEventListingRegistrations,
8320
+ GetSelfEventListingReport,
8068
8321
  GetSelfEventListings,
8069
8322
  GetSelfEventRegistration,
8070
8323
  GetSelfEventRegistrationCheckout,
@@ -8111,10 +8364,14 @@ export {
8111
8364
  LISTING_ANNOUNCEMENT_QUERY_KEY,
8112
8365
  LISTING_CO_HOSTS_QUERY_KEY,
8113
8366
  LISTING_EMAIL_QUERY_KEY,
8367
+ LISTING_PURCHASES_QUERY_KEY,
8368
+ LISTING_PURCHASE_QUERY_KEY,
8114
8369
  LISTING_QUERY_KEY,
8115
8370
  LISTING_QUESTIONS_QUERY_KEY,
8116
8371
  LISTING_REGISTRATIONS_QUERY_KEY,
8372
+ LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY,
8117
8373
  LISTING_REGISTRATION_QUERY_KEY,
8374
+ LISTING_REPORT_QUERY_KEY,
8118
8375
  LeaveGroup,
8119
8376
  LeaveSelfChatChannel,
8120
8377
  LikeActivity,
@@ -8235,7 +8492,9 @@ export {
8235
8492
  SET_LEVEL_SPONSORS_QUERY_DATA,
8236
8493
  SET_LISTING_ANNOUNCEMENT_QUERY_KEY,
8237
8494
  SET_LISTING_EMAIL_QUERY_DATA,
8495
+ SET_LISTING_PURCHASE_QUERY_KEY,
8238
8496
  SET_LISTING_QUERY_DATA,
8497
+ SET_LISTING_REGISTRATION_PURCHASE_SECTIONS_QUERY_DATA,
8239
8498
  SET_LISTING_REGISTRATION_QUERY_KEY,
8240
8499
  SET_ORGANIZATION_PAGE_QUERY_DATA,
8241
8500
  SET_PUSH_DEVICE_QUERY_DATA,
@@ -8264,12 +8523,14 @@ export {
8264
8523
  TicketEventAccessLevel,
8265
8524
  TicketVisibility,
8266
8525
  TransferPurchase,
8526
+ UndoCheckinListingRegistrationPurchase,
8267
8527
  UnfollowAccount,
8268
8528
  UnlikeActivity,
8269
8529
  UpdateGroup,
8270
8530
  UpdateListing,
8271
8531
  UpdateListingEmail,
8272
8532
  UpdateListingQuestion,
8533
+ UpdateListingRegistrationPurchaseResponses,
8273
8534
  UpdateListingSession,
8274
8535
  UpdateListingSpeaker,
8275
8536
  UpdateSelf,
@@ -8280,6 +8541,7 @@ export {
8280
8541
  UpdateSelfNotificationPreferences,
8281
8542
  UpdateSelfPushDevice,
8282
8543
  UpdateSubscriptionPaymentMethod,
8544
+ UploadFile,
8283
8545
  isListing,
8284
8546
  isManagedCoupon,
8285
8547
  isRegistrationQuestion,
@@ -8428,6 +8690,7 @@ export {
8428
8690
  useGetLevel,
8429
8691
  useGetLevelSponsors,
8430
8692
  useGetLevels,
8693
+ useGetListingRegistrationPurchaseSections,
8431
8694
  useGetOrganization,
8432
8695
  useGetOrganizationExplore,
8433
8696
  useGetOrganizationPage,
@@ -8447,8 +8710,11 @@ export {
8447
8710
  useGetSelfEventListingAnnouncements,
8448
8711
  useGetSelfEventListingCoHosts,
8449
8712
  useGetSelfEventListingEmail,
8713
+ useGetSelfEventListingPurchase,
8714
+ useGetSelfEventListingPurchases,
8450
8715
  useGetSelfEventListingQuestions,
8451
8716
  useGetSelfEventListingRegistration,
8717
+ useGetSelfEventListingReport,
8452
8718
  useGetSelfEventListings,
8453
8719
  useGetSelfEventListingsRegistrations,
8454
8720
  useGetSelfEventRegistration,
@@ -8508,12 +8774,14 @@ export {
8508
8774
  useSelfUpdateGroupMembership,
8509
8775
  useSubmitSelfEventRegistration,
8510
8776
  useTransferPurchase,
8777
+ useUndoCheckinListingRegistrationPurchase,
8511
8778
  useUnfollowAccount,
8512
8779
  useUnlikeActivity,
8513
8780
  useUpdateGroup,
8514
8781
  useUpdateListing,
8515
8782
  useUpdateListingEmail,
8516
8783
  useUpdateListingQuestion,
8784
+ useUpdateListingRegistrationPurchaseResponses,
8517
8785
  useUpdateListingSession,
8518
8786
  useUpdateListingSpeaker,
8519
8787
  useUpdateSelf,
@@ -8523,5 +8791,6 @@ export {
8523
8791
  useUpdateSelfLead,
8524
8792
  useUpdateSelfNotificationPreferences,
8525
8793
  useUpdateSelfPushDevice,
8526
- useUpdateSubscriptionPaymentMethod
8794
+ useUpdateSubscriptionPaymentMethod,
8795
+ useUploadFile
8527
8796
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/client",
3
- "version": "0.5.13",
3
+ "version": "0.5.15",
4
4
  "description": "Client API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {