@connectedxm/client 0.1.28 → 0.2.0

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
@@ -292,6 +292,13 @@ var SubscriptionStatus = /* @__PURE__ */ ((SubscriptionStatus2) => {
292
292
  SubscriptionStatus2["unpaid"] = "unpaid";
293
293
  return SubscriptionStatus2;
294
294
  })(SubscriptionStatus || {});
295
+ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
296
+ InvoiceStatus2["draft"] = "draft";
297
+ InvoiceStatus2["sent"] = "sent";
298
+ InvoiceStatus2["paid"] = "paid";
299
+ InvoiceStatus2["void"] = "void";
300
+ return InvoiceStatus2;
301
+ })(InvoiceStatus || {});
295
302
 
296
303
  // src/utilities/AppendInfiniteQuery.ts
297
304
  import { produce } from "immer";
@@ -3009,29 +3016,20 @@ var SET_SELF_EVENT_REGISTRATION_QUERY_DATA = (client, keyParams, response, baseK
3009
3016
  };
3010
3017
  var GetSelfEventRegistration = async ({
3011
3018
  eventId,
3012
- ticket,
3013
- quantity,
3014
- coupon,
3015
3019
  clientApiParams
3016
3020
  }) => {
3017
3021
  const clientApi = await GetClientAPI(clientApiParams);
3018
- const { data } = await clientApi.get(`/self/events/${eventId}/registration`, {
3019
- params: {
3020
- ticket: ticket || void 0,
3021
- quantity: quantity || void 0,
3022
- coupon: coupon || void 0
3023
- }
3024
- });
3022
+ const { data } = await clientApi.get(
3023
+ `/self/events/${eventId}/registration`,
3024
+ {}
3025
+ );
3025
3026
  return data;
3026
3027
  };
3027
- var useGetSelfEventRegistration = (eventId, ticket, quantity, coupon, options = {}) => {
3028
+ var useGetSelfEventRegistration = (eventId, options = {}) => {
3028
3029
  return useConnectedSingleQuery_default(
3029
3030
  SELF_EVENT_REGISTRATION_QUERY_KEY(eventId),
3030
3031
  (params) => GetSelfEventRegistration({
3031
3032
  eventId,
3032
- ticket,
3033
- quantity,
3034
- coupon,
3035
3033
  ...params
3036
3034
  }),
3037
3035
  {
@@ -3075,6 +3073,114 @@ var useGetSelfEventRegistrationCheckout = (eventId, registrationId = "", options
3075
3073
  );
3076
3074
  };
3077
3075
 
3076
+ // src/queries/self/registration/useGetSelfEventRegistrationPurchase.ts
3077
+ var SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY = (eventId, registrationId, purchaseId) => [
3078
+ ...SELF_QUERY_KEY(),
3079
+ "EVENT",
3080
+ eventId,
3081
+ "REGISTRATION",
3082
+ registrationId,
3083
+ "PURCHASE",
3084
+ purchaseId
3085
+ ];
3086
+ var SET_SELF_EVENT_REGISTRATION_PURCHASE_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3087
+ client.setQueryData(
3088
+ [
3089
+ ...SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY(...keyParams),
3090
+ ...GetBaseSingleQueryKeys(...baseKeys)
3091
+ ],
3092
+ response
3093
+ );
3094
+ };
3095
+ var GetSelfEventRegistrationPurchase = async ({
3096
+ eventId,
3097
+ registrationId,
3098
+ purchaseId,
3099
+ clientApiParams
3100
+ }) => {
3101
+ const clientApi = await GetClientAPI(clientApiParams);
3102
+ const { data } = await clientApi.get(
3103
+ `/self/events/${eventId}/registration/${registrationId}/registered/purchases/${purchaseId}`,
3104
+ {}
3105
+ );
3106
+ return data;
3107
+ };
3108
+ var useGetSelfEventRegistrationPurchase = (eventId, registrationId, purchaseId, options = {}) => {
3109
+ return useConnectedSingleQuery_default(
3110
+ SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY(
3111
+ eventId,
3112
+ registrationId,
3113
+ purchaseId
3114
+ ),
3115
+ (params) => GetSelfEventRegistrationPurchase({
3116
+ eventId,
3117
+ registrationId,
3118
+ purchaseId,
3119
+ ...params
3120
+ }),
3121
+ {
3122
+ ...options,
3123
+ enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
3124
+ }
3125
+ );
3126
+ };
3127
+
3128
+ // src/queries/self/registration/useGetSelfEventRegistrationPurchaseSections.ts
3129
+ var SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY = (eventId, registrationId, purchaseId) => [
3130
+ ...SELF_QUERY_KEY(),
3131
+ "EVENT",
3132
+ eventId,
3133
+ "REGISTRATION",
3134
+ registrationId,
3135
+ "PURCHASE",
3136
+ purchaseId,
3137
+ "SECTIONS"
3138
+ ];
3139
+ var SET_SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_DATA = (client, keyParams, response, baseKeys = ["en"]) => {
3140
+ client.setQueryData(
3141
+ [
3142
+ ...SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(...keyParams),
3143
+ ...GetBaseSingleQueryKeys(...baseKeys)
3144
+ ],
3145
+ response
3146
+ );
3147
+ };
3148
+ var GetSelfEventRegistrationPurchaseSections = async ({
3149
+ eventId,
3150
+ registrationId,
3151
+ purchaseId,
3152
+ clientApiParams
3153
+ }) => {
3154
+ const clientApi = await GetClientAPI(clientApiParams);
3155
+ const { data } = await clientApi.get(
3156
+ `/self/events/${eventId}/registration/${registrationId}/draft/purchases/${purchaseId}`,
3157
+ {}
3158
+ );
3159
+ return data;
3160
+ };
3161
+ var useGetSelfEventRegistrationPurchaseSections = (eventId, registrationId, purchaseId, options = {}) => {
3162
+ return useConnectedSingleQuery_default(
3163
+ SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
3164
+ eventId,
3165
+ registrationId,
3166
+ purchaseId
3167
+ ),
3168
+ (params) => GetSelfEventRegistrationPurchaseSections({
3169
+ eventId,
3170
+ registrationId,
3171
+ purchaseId,
3172
+ ...params
3173
+ }),
3174
+ {
3175
+ retry: false,
3176
+ staleTime: Infinity,
3177
+ refetchOnMount: false,
3178
+ ...options,
3179
+ enabled: !!eventId && !!registrationId && !!purchaseId && (options?.enabled ?? true)
3180
+ }
3181
+ );
3182
+ };
3183
+
3078
3184
  // src/queries/self/subscriptions/useGetSelfSubscriptions.ts
3079
3185
  var SELF_SUBSCRIPTIONS_QUERY_KEY = (status) => {
3080
3186
  const key = [...SELF_QUERY_KEY(), "SUBSCRIPTIONS"];
@@ -4698,6 +4804,31 @@ var useCreateEventLead = (options = {}) => {
4698
4804
  return useConnectedMutation(CreateEventLead, options);
4699
4805
  };
4700
4806
 
4807
+ // src/mutations/invoices/useCaptureInvoicePayment.ts
4808
+ var CaptureInvoicePayment = async ({
4809
+ invoiceId,
4810
+ intentId,
4811
+ clientApiParams,
4812
+ queryClient
4813
+ }) => {
4814
+ const clientApi = await GetClientAPI(clientApiParams);
4815
+ const { data } = await clientApi.post(
4816
+ `/invoices/${invoiceId}/capture`,
4817
+ {
4818
+ intentId
4819
+ }
4820
+ );
4821
+ if (queryClient && data.status === "ok") {
4822
+ SET_INVOICE_QUERY_DATA(queryClient, [invoiceId], data, [
4823
+ clientApiParams.locale
4824
+ ]);
4825
+ }
4826
+ return data;
4827
+ };
4828
+ var useCaptureInvoicePayment = (options = {}) => {
4829
+ return useConnectedMutation_default(CaptureInvoicePayment, options);
4830
+ };
4831
+
4701
4832
  // src/mutations/self/chat/useAddSelfChatChannelMember.ts
4702
4833
  var AddSelfChatChannelMember = async ({
4703
4834
  channelId,
@@ -4962,53 +5093,6 @@ var useCaptureSelfEventRegistrationPayment = (options = {}) => {
4962
5093
  return useConnectedMutation_default(CaptureSelfEventRegistrationPayment, options);
4963
5094
  };
4964
5095
 
4965
- // src/mutations/self/events/registration/draft/useCreateSelfEventRegistrationGuest.tsx
4966
- var CreateSelfEventRegistrationGuest = async ({
4967
- eventId,
4968
- registrationId,
4969
- guest,
4970
- clientApiParams,
4971
- queryClient
4972
- }) => {
4973
- const clientApi = await GetClientAPI(clientApiParams);
4974
- const { data } = await clientApi.post(
4975
- `/self/events/${eventId}/registration/${registrationId}/draft/guests`,
4976
- guest
4977
- );
4978
- if (queryClient && data.status === "ok") {
4979
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
4980
- clientApiParams.locale
4981
- ]);
4982
- }
4983
- return data;
4984
- };
4985
- var useCreateSelfEventRegistrationGuest = (options = {}) => {
4986
- return useConnectedMutation_default(CreateSelfEventRegistrationGuest, options);
4987
- };
4988
-
4989
- // src/mutations/self/events/registration/draft/useDeleteSelfEventRegistrationGuest.tsx
4990
- var DeleteSelfEventRegistrationGuest = async ({
4991
- eventId,
4992
- registrationId,
4993
- guestId,
4994
- clientApiParams,
4995
- queryClient
4996
- }) => {
4997
- const clientApi = await GetClientAPI(clientApiParams);
4998
- const { data } = await clientApi.delete(
4999
- `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`
5000
- );
5001
- if (queryClient && data.status === "ok") {
5002
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5003
- clientApiParams.locale
5004
- ]);
5005
- }
5006
- return data;
5007
- };
5008
- var useDeleteSelfEventRegistrationGuest = (options = {}) => {
5009
- return useConnectedMutation_default(DeleteSelfEventRegistrationGuest, options);
5010
- };
5011
-
5012
5096
  // src/mutations/self/events/registration/draft/useRemoveSelfEventRegistrationCoupon.ts
5013
5097
  var RemoveSelfEventRegistrationCoupon = async ({
5014
5098
  eventId,
@@ -5053,12 +5137,13 @@ var useRemoveSelfEventRegistrationCoupon = (options = {}) => {
5053
5137
  var RemoveSelfEventRegistrationTicket = async ({
5054
5138
  eventId,
5055
5139
  registrationId,
5140
+ ticketId,
5056
5141
  clientApiParams,
5057
5142
  queryClient
5058
5143
  }) => {
5059
5144
  const clientApi = await GetClientAPI(clientApiParams);
5060
5145
  const { data } = await clientApi.delete(
5061
- `/self/events/${eventId}/registration/${registrationId}/draft/ticket`
5146
+ `/self/events/${eventId}/registration/${registrationId}/draft/ticket/${ticketId}`
5062
5147
  );
5063
5148
  if (queryClient && data.status === "ok") {
5064
5149
  queryClient.removeQueries({
@@ -5070,18 +5155,6 @@ var RemoveSelfEventRegistrationTicket = async ({
5070
5155
  SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5071
5156
  clientApiParams.locale
5072
5157
  ]);
5073
- queryClient.invalidateQueries({
5074
- queryKey: SELF_EVENTS_QUERY_KEY(false)
5075
- });
5076
- queryClient.invalidateQueries({
5077
- queryKey: SELF_EVENTS_QUERY_KEY(true)
5078
- });
5079
- queryClient.invalidateQueries({
5080
- queryKey: EVENT_QUERY_KEY(eventId)
5081
- });
5082
- queryClient.invalidateQueries({
5083
- queryKey: EVENT_REGISTRANTS_QUERY_KEY(eventId)
5084
- });
5085
5158
  }
5086
5159
  return data;
5087
5160
  };
@@ -5089,20 +5162,21 @@ var useRemoveSelfEventRegistrationTicket = (options = {}) => {
5089
5162
  return useConnectedMutation_default(RemoveSelfEventRegistrationTicket, options);
5090
5163
  };
5091
5164
 
5092
- // src/mutations/self/events/registration/draft/useSelectSelfEventRegistrationTicket.ts
5093
- var SelectSelfEventRegistrationTicket = async ({
5165
+ // src/mutations/self/events/registration/draft/useAddSelfEventRegistrationPurchase.ts
5166
+ var AddSelfEventRegistrationPurchase = async ({
5094
5167
  eventId,
5095
5168
  registrationId,
5096
5169
  ticketId,
5170
+ quantity,
5097
5171
  clientApiParams,
5098
5172
  queryClient
5099
5173
  }) => {
5100
5174
  const clientApi = await GetClientAPI(clientApiParams);
5101
5175
  const { data } = await clientApi.post(
5102
- `/self/events/${eventId}/registration/${registrationId}/draft/ticket`,
5176
+ `/self/events/${eventId}/registration/${registrationId}/draft/purchases`,
5103
5177
  {
5104
5178
  ticketId,
5105
- quantity: 1
5179
+ quantity
5106
5180
  }
5107
5181
  );
5108
5182
  if (queryClient && data.status === "ok") {
@@ -5124,8 +5198,8 @@ var SelectSelfEventRegistrationTicket = async ({
5124
5198
  }
5125
5199
  return data;
5126
5200
  };
5127
- var useSelectSelfEventRegistrationTicket = (options = {}) => {
5128
- return useConnectedMutation_default(SelectSelfEventRegistrationTicket, options);
5201
+ var useAddSelfEventRegistrationPurchase = (options = {}) => {
5202
+ return useConnectedMutation_default(AddSelfEventRegistrationPurchase, options);
5129
5203
  };
5130
5204
 
5131
5205
  // src/mutations/self/events/registration/draft/useSubmitSelfEventRegistration.ts
@@ -5152,123 +5226,103 @@ var useSubmitSelfEventRegistration = (options = {}) => {
5152
5226
  return useConnectedMutation_default(SubmitSelfEventRegistration, options);
5153
5227
  };
5154
5228
 
5155
- // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationGuest.tsx
5156
- var UpdateSelfEventRegistrationGuest = async ({
5157
- eventId,
5158
- registrationId,
5159
- guestId,
5160
- guest,
5161
- clientApiParams,
5162
- queryClient
5163
- }) => {
5164
- const clientApi = await GetClientAPI(clientApiParams);
5165
- const { data } = await clientApi.put(
5166
- `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}`,
5167
- guest
5168
- );
5169
- if (queryClient && data.status === "ok") {
5170
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5171
- clientApiParams.locale
5172
- ]);
5173
- }
5174
- return data;
5175
- };
5176
- var useUpdateSelfEventRegistrationGuest = (options = {}) => {
5177
- return useConnectedMutation_default(UpdateSelfEventRegistrationGuest, options);
5178
- };
5179
-
5180
- // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationGuestResponseFile.tsx
5181
- var UpdateSelfEventRegistrationGuestResponseFile = async ({
5182
- eventId,
5183
- registrationId,
5184
- questionId,
5185
- guestId,
5186
- dataUrl,
5187
- name,
5188
- clientApiParams
5189
- }) => {
5190
- if (!guestId)
5191
- throw new Error("Guest ID is required");
5192
- const clientApi = await GetClientAPI(clientApiParams);
5193
- const { data } = await clientApi.put(
5194
- `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses/file`,
5195
- {
5196
- dataUrl,
5197
- name,
5198
- questionId
5199
- }
5200
- );
5201
- return data;
5202
- };
5203
- var useUpdateSelfEventRegistrationGuestResponseFile = (options = {}) => {
5204
- return useConnectedMutation_default(UpdateSelfEventRegistrationGuestResponseFile, options);
5205
- };
5206
-
5207
- // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationGuestResponses.tsx
5208
- var UpdateSelfEventRegistrationGuestResponses = async ({
5209
- eventId,
5210
- registrationId,
5211
- guestId,
5212
- responses,
5213
- clientApiParams
5214
- }) => {
5215
- const clientApi = await GetClientAPI(clientApiParams);
5216
- const { data } = await clientApi.put(
5217
- `/self/events/${eventId}/registration/${registrationId}/draft/guests/${guestId}/responses`,
5218
- responses
5219
- );
5220
- return data;
5221
- };
5222
- var useUpdateSelfEventRegistrationGuestResponses = (options = {}) => {
5223
- return useConnectedMutation_default(UpdateSelfEventRegistrationGuestResponses, options);
5224
- };
5225
-
5226
- // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationResponseFile.tsx
5227
- var UpdateSelfEventRegistrationResponseFile = async ({
5229
+ // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationPurchaseQuestionResponse.ts
5230
+ import { produce as produce4 } from "immer";
5231
+ var UpdateSelfEventRegistrationQuestionResponse = async ({
5228
5232
  eventId,
5229
5233
  registrationId,
5230
- dataUrl,
5231
- name,
5234
+ purchaseId,
5232
5235
  questionId,
5233
- clientApiParams
5234
- }) => {
5235
- const clientApi = await GetClientAPI(clientApiParams);
5236
- const { data } = await clientApi.put(
5237
- `/self/events/${eventId}/registration/${registrationId}/draft/responses/file`,
5238
- {
5239
- dataUrl,
5240
- name,
5241
- questionId
5242
- }
5243
- );
5244
- return data;
5245
- };
5246
- var useUpdateSelfEventRegistrationResponseFile = (options = {}) => {
5247
- return useConnectedMutation_default(UpdateSelfEventRegistrationResponseFile, options);
5248
- };
5249
-
5250
- // src/mutations/self/events/registration/draft/useUpdateSelfEventRegistrationResponses.tsx
5251
- var UpdateSelfEventRegistrationResponses = async ({
5252
- eventId,
5253
- registrationId,
5254
- responses,
5236
+ value,
5237
+ update,
5255
5238
  clientApiParams,
5256
5239
  queryClient
5257
5240
  }) => {
5258
5241
  const clientApi = await GetClientAPI(clientApiParams);
5259
- const { data } = await clientApi.put(
5260
- `/self/events/${eventId}/registration/${registrationId}/draft/responses`,
5261
- responses
5262
- );
5242
+ let data;
5243
+ if (update) {
5244
+ const response2 = await clientApi.put(
5245
+ `/self/events/${eventId}/registration/${registrationId}/registered/purchases/${purchaseId}/questions/${questionId}`,
5246
+ {
5247
+ value
5248
+ }
5249
+ );
5250
+ data = response2.data;
5251
+ } else {
5252
+ const response2 = await clientApi.put(
5253
+ `/self/events/${eventId}/registration/${registrationId}/draft/purchases/${purchaseId}/questions/${questionId}`,
5254
+ {
5255
+ value
5256
+ }
5257
+ );
5258
+ data = response2.data;
5259
+ }
5260
+ const response = {
5261
+ ...data,
5262
+ data: data.data[0]
5263
+ };
5263
5264
  if (queryClient && data.status === "ok") {
5264
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5265
+ SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], response, [
5265
5266
  clientApiParams.locale
5266
5267
  ]);
5268
+ queryClient.invalidateQueries({
5269
+ queryKey: SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
5270
+ eventId,
5271
+ registrationId,
5272
+ purchaseId
5273
+ )
5274
+ });
5275
+ queryClient.invalidateQueries({
5276
+ queryKey: SELF_EVENT_REGISTRATION_QUERY_KEY(eventId)
5277
+ });
5278
+ queryClient.setQueryData(
5279
+ [
5280
+ ...SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY(
5281
+ eventId,
5282
+ registrationId,
5283
+ purchaseId
5284
+ ),
5285
+ ...GetBaseSingleQueryKeys(clientApiParams.locale)
5286
+ ],
5287
+ (oldData) => {
5288
+ if (oldData.data) {
5289
+ return produce4(oldData, (draft) => {
5290
+ draft.data.forEach((section) => {
5291
+ section.questions.forEach((question) => {
5292
+ const fillQuestionResponse = (question2, questionId2, value2) => {
5293
+ if (question2.id === questionId2) {
5294
+ question2.response = value2;
5295
+ }
5296
+ if (question2.choices.length > 0) {
5297
+ question2.choices.forEach((choice) => {
5298
+ if (choice.subQuestions.length > 0) {
5299
+ choice.subQuestions.forEach((subQuestion) => {
5300
+ fillQuestionResponse(
5301
+ subQuestion,
5302
+ questionId2,
5303
+ data.data[1]
5304
+ );
5305
+ });
5306
+ }
5307
+ });
5308
+ }
5309
+ };
5310
+ fillQuestionResponse(question, questionId, data.data[1]);
5311
+ });
5312
+ });
5313
+ });
5314
+ }
5315
+ return oldData;
5316
+ }
5317
+ );
5267
5318
  }
5268
- return data;
5319
+ return response;
5269
5320
  };
5270
- var useUpdateSelfEventRegistrationResponses = (options = {}) => {
5271
- return useConnectedMutation_default(UpdateSelfEventRegistrationResponses, options);
5321
+ var useUpdateSelfEventRegistrationQuestionResponse = (update, options = {}) => {
5322
+ return useConnectedMutation_default(
5323
+ (params) => UpdateSelfEventRegistrationQuestionResponse({ update, ...params }),
5324
+ options
5325
+ );
5272
5326
  };
5273
5327
 
5274
5328
  // src/mutations/self/events/registration/registered/useCancelEventRegistration.ts
@@ -5310,6 +5364,7 @@ var CancelTransfer = async ({
5310
5364
  transferId,
5311
5365
  eventId,
5312
5366
  registrationId,
5367
+ purchaseId,
5313
5368
  clientApiParams,
5314
5369
  queryClient
5315
5370
  }) => {
@@ -5318,6 +5373,13 @@ var CancelTransfer = async ({
5318
5373
  `/self/events/${eventId}/registration/${registrationId}/transfer/${transferId}`
5319
5374
  );
5320
5375
  if (queryClient && data.status === "ok") {
5376
+ queryClient.invalidateQueries({
5377
+ queryKey: SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY(
5378
+ eventId,
5379
+ registrationId,
5380
+ purchaseId
5381
+ )
5382
+ });
5321
5383
  queryClient.invalidateQueries({
5322
5384
  queryKey: SELF_EVENT_REGISTRATION_QUERY_KEY(eventId)
5323
5385
  });
@@ -5346,6 +5408,13 @@ var TransferPurchase = async ({
5346
5408
  }
5347
5409
  );
5348
5410
  if (queryClient && data.status === "ok") {
5411
+ queryClient.invalidateQueries({
5412
+ queryKey: SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY(
5413
+ eventId,
5414
+ registrationId,
5415
+ purchaseId
5416
+ )
5417
+ });
5349
5418
  queryClient.invalidateQueries({
5350
5419
  queryKey: SELF_EVENT_REGISTRATION_QUERY_KEY(eventId)
5351
5420
  });
@@ -5356,71 +5425,6 @@ var useTransferPurchase = (options = {}) => {
5356
5425
  return useConnectedMutation_default(TransferPurchase, options);
5357
5426
  };
5358
5427
 
5359
- // src/mutations/self/events/registration/registered/useUpdateSelfEventRegistrationResponse.ts
5360
- var UpdateSelfEventRegistrationResponse = async ({
5361
- eventId,
5362
- registrationId,
5363
- questionId,
5364
- response,
5365
- clientApiParams,
5366
- queryClient
5367
- }) => {
5368
- const clientApi = await GetClientAPI(clientApiParams);
5369
- const { data } = await clientApi.put(
5370
- `/self/events/${eventId}/registration/${registrationId}/registered/response`,
5371
- {
5372
- response
5373
- },
5374
- {
5375
- params: {
5376
- questionId
5377
- }
5378
- }
5379
- );
5380
- if (queryClient && data.status === "ok") {
5381
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5382
- clientApiParams.locale
5383
- ]);
5384
- }
5385
- return data;
5386
- };
5387
- var useUpdateSelfEventRegistrationResponse = (options = {}) => {
5388
- return useConnectedMutation_default(UpdateSelfEventRegistrationResponse, options);
5389
- };
5390
-
5391
- // src/mutations/self/events/registration/registered/useUpdateSelfEventRegistrationGuestResponse.tsx
5392
- var UpdateSelfEventRegistrationGuestResponse = async ({
5393
- eventId,
5394
- registrationId,
5395
- questionId,
5396
- guestId,
5397
- response,
5398
- clientApiParams,
5399
- queryClient
5400
- }) => {
5401
- const clientApi = await GetClientAPI(clientApiParams);
5402
- const { data } = await clientApi.put(
5403
- `/self/events/${eventId}/registration/${registrationId}/registered/guests/${guestId}/response`,
5404
- {
5405
- response
5406
- },
5407
- {
5408
- params: {
5409
- questionId
5410
- }
5411
- }
5412
- );
5413
- if (queryClient && data.status === "ok") {
5414
- SET_SELF_EVENT_REGISTRATION_QUERY_DATA(queryClient, [eventId], data, [
5415
- clientApiParams.locale
5416
- ]);
5417
- }
5418
- return data;
5419
- };
5420
- var useUpdateSelfEventRegistrationGuestResponse = (options = {}) => {
5421
- return useConnectedMutation_default(UpdateSelfEventRegistrationGuestResponse, options);
5422
- };
5423
-
5424
5428
  // src/mutations/self/subscriptions/useCancelSubscription.ts
5425
5429
  var CancelSubscription = async ({
5426
5430
  subscriptionId,
@@ -5883,11 +5887,11 @@ var useSelfCheckinRegistration = (options = {}) => {
5883
5887
  };
5884
5888
 
5885
5889
  // src/mutations/activities/optimistic/UpdateComments.ts
5886
- import { produce as produce4 } from "immer";
5890
+ import { produce as produce5 } from "immer";
5887
5891
  var UpdateCommentsSingle = (increment, queryClient, KEY) => {
5888
5892
  queryClient.setQueryData(
5889
5893
  KEY,
5890
- (originalData) => produce4(originalData, (draft) => {
5894
+ (originalData) => produce5(originalData, (draft) => {
5891
5895
  if (!draft?.data) {
5892
5896
  return;
5893
5897
  }
@@ -5899,7 +5903,7 @@ var UpdateCommentsSingle = (increment, queryClient, KEY) => {
5899
5903
  var UpdateCommentsInfinite = (increment, queryClient, KEY, activityId) => {
5900
5904
  queryClient.setQueriesData(
5901
5905
  { queryKey: KEY, exact: false },
5902
- (originalData) => produce4(originalData, (draft) => {
5906
+ (originalData) => produce5(originalData, (draft) => {
5903
5907
  if (!draft?.pages || draft.pages.length === 0) {
5904
5908
  return;
5905
5909
  }
@@ -6395,6 +6399,7 @@ export {
6395
6399
  AddSelfEventListingSession,
6396
6400
  AddSelfEventListingSpeaker,
6397
6401
  AddSelfEventListingSponsor,
6402
+ AddSelfEventRegistrationPurchase,
6398
6403
  AddSelfEventSession,
6399
6404
  AdvertisementType,
6400
6405
  AppendInfiniteQuery,
@@ -6417,6 +6422,7 @@ export {
6417
6422
  CancelEventRegistration,
6418
6423
  CancelSubscription,
6419
6424
  CancelTransfer,
6425
+ CaptureInvoicePayment,
6420
6426
  CaptureSelfEventRegistrationPayment,
6421
6427
  CommunityAccess,
6422
6428
  CommunityMembershipRole,
@@ -6429,7 +6435,6 @@ export {
6429
6435
  CreateSelfChatChannel,
6430
6436
  CreateSelfChatChannelMessage,
6431
6437
  CreateSelfEventListing,
6432
- CreateSelfEventRegistrationGuest,
6433
6438
  CreateSubscription,
6434
6439
  CreateSupportTicket,
6435
6440
  CreateTeamAccount,
@@ -6439,7 +6444,6 @@ export {
6439
6444
  DeleteSelf,
6440
6445
  DeleteSelfChatChannel,
6441
6446
  DeleteSelfChatChannelMessage,
6442
- DeleteSelfEventRegistrationGuest,
6443
6447
  DeleteSelfPushDevice,
6444
6448
  EVENTS_FEATURED_QUERY_KEY,
6445
6449
  EVENTS_QUERY_KEY,
@@ -6535,6 +6539,8 @@ export {
6535
6539
  GetSelfEventListings,
6536
6540
  GetSelfEventRegistration,
6537
6541
  GetSelfEventRegistrationCheckout,
6542
+ GetSelfEventRegistrationPurchase,
6543
+ GetSelfEventRegistrationPurchaseSections,
6538
6544
  GetSelfEventSessions,
6539
6545
  GetSelfEvents,
6540
6546
  GetSelfFeed,
@@ -6557,6 +6563,7 @@ export {
6557
6563
  GetSponsors,
6558
6564
  INVOICE_QUERY_KEY,
6559
6565
  ImageType,
6566
+ InvoiceStatus,
6560
6567
  LEVELS_QUERY_KEY,
6561
6568
  LEVEL_QUERY_KEY,
6562
6569
  LEVEL_SPONSORS_QUERY_KEY,
@@ -6599,6 +6606,8 @@ export {
6599
6606
  SELF_EVENT_LISTING_QUERY_KEY,
6600
6607
  SELF_EVENT_LISTING_REGISTRATIONS_QUERY_KEY,
6601
6608
  SELF_EVENT_REGISTRATION_CHECKOUT_QUERY_KEY,
6609
+ SELF_EVENT_REGISTRATION_PURCHASE_QUERY_KEY,
6610
+ SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_KEY,
6602
6611
  SELF_EVENT_REGISTRATION_QUERY_KEY,
6603
6612
  SELF_EVENT_SESSIONS_QUERY_KEY,
6604
6613
  SELF_FEED_QUERY_KEY,
@@ -6673,6 +6682,8 @@ export {
6673
6682
  SET_SELF_CHAT_CHANNEL_QUERY_DATA,
6674
6683
  SET_SELF_COMMUNITY_MEMBERSHIP_QUERY_DATA,
6675
6684
  SET_SELF_EVENT_LISTING_QUERY_DATA,
6685
+ SET_SELF_EVENT_REGISTRATION_PURCHASE_QUERY_DATA,
6686
+ SET_SELF_EVENT_REGISTRATION_PURCHASE_SECTIONS_QUERY_DATA,
6676
6687
  SET_SELF_EVENT_REGISTRATION_QUERY_DATA,
6677
6688
  SET_SELF_QUERY_DATA,
6678
6689
  SET_SERIES_EVENTS_QUERY_DATA,
@@ -6683,7 +6694,6 @@ export {
6683
6694
  SPONSORS_QUERY_KEY,
6684
6695
  SPONSOR_QUERY_KEY,
6685
6696
  SelectSelfEventRegistrationCoupon,
6686
- SelectSelfEventRegistrationTicket,
6687
6697
  SelfCheckinRegistration,
6688
6698
  SelfCreateActivity,
6689
6699
  SelfJoinCommunity,
@@ -6703,13 +6713,7 @@ export {
6703
6713
  UpdateSelfEventListing,
6704
6714
  UpdateSelfEventListingSession,
6705
6715
  UpdateSelfEventListingSpeaker,
6706
- UpdateSelfEventRegistrationGuest,
6707
- UpdateSelfEventRegistrationGuestResponse,
6708
- UpdateSelfEventRegistrationGuestResponseFile,
6709
- UpdateSelfEventRegistrationGuestResponses,
6710
- UpdateSelfEventRegistrationResponse,
6711
- UpdateSelfEventRegistrationResponseFile,
6712
- UpdateSelfEventRegistrationResponses,
6716
+ UpdateSelfEventRegistrationQuestionResponse,
6713
6717
  UpdateSelfImage,
6714
6718
  UpdateSelfLead,
6715
6719
  UpdateSelfNotificationPreferences,
@@ -6760,10 +6764,12 @@ export {
6760
6764
  useAddSelfEventListingSession,
6761
6765
  useAddSelfEventListingSpeaker,
6762
6766
  useAddSelfEventListingSponsor,
6767
+ useAddSelfEventRegistrationPurchase,
6763
6768
  useAddSelfEventSession,
6764
6769
  useCancelEventRegistration,
6765
6770
  useCancelSubscription,
6766
6771
  useCancelTransfer,
6772
+ useCaptureInvoicePayment,
6767
6773
  useCaptureSelfEventRegistrationPayment,
6768
6774
  useCompleteEventActivation,
6769
6775
  useConnectedInfiniteQuery,
@@ -6775,7 +6781,6 @@ export {
6775
6781
  useCreateSelfChatChannel,
6776
6782
  useCreateSelfChatChannelMessage,
6777
6783
  useCreateSelfEventListing,
6778
- useCreateSelfEventRegistrationGuest,
6779
6784
  useCreateSubscription,
6780
6785
  useCreateSupportTicket,
6781
6786
  useCreateTeamAccount,
@@ -6784,7 +6789,6 @@ export {
6784
6789
  useDeleteSelf,
6785
6790
  useDeleteSelfChatChannel,
6786
6791
  useDeleteSelfChatChannelMessage,
6787
- useDeleteSelfEventRegistrationGuest,
6788
6792
  useDeleteSelfPushDevice,
6789
6793
  useFollowAccount,
6790
6794
  useGetAccount,
@@ -6856,6 +6860,8 @@ export {
6856
6860
  useGetSelfEventListingsRegistrations,
6857
6861
  useGetSelfEventRegistration,
6858
6862
  useGetSelfEventRegistrationCheckout,
6863
+ useGetSelfEventRegistrationPurchase,
6864
+ useGetSelfEventRegistrationPurchaseSections,
6859
6865
  useGetSelfEventSessions,
6860
6866
  useGetSelfEvents,
6861
6867
  useGetSelfFeed,
@@ -6890,7 +6896,6 @@ export {
6890
6896
  useRemoveSelfEventSession,
6891
6897
  useReshareActivity,
6892
6898
  useSelectSelfEventRegistrationCoupon,
6893
- useSelectSelfEventRegistrationTicket,
6894
6899
  useSelfCheckinRegistration,
6895
6900
  useSelfCreateActivity,
6896
6901
  useSelfJoinCommunity,
@@ -6906,13 +6911,7 @@ export {
6906
6911
  useUpdateSelfEventListing,
6907
6912
  useUpdateSelfEventListingSession,
6908
6913
  useUpdateSelfEventListingSpeaker,
6909
- useUpdateSelfEventRegistrationGuest,
6910
- useUpdateSelfEventRegistrationGuestResponse,
6911
- useUpdateSelfEventRegistrationGuestResponseFile,
6912
- useUpdateSelfEventRegistrationGuestResponses,
6913
- useUpdateSelfEventRegistrationResponse,
6914
- useUpdateSelfEventRegistrationResponseFile,
6915
- useUpdateSelfEventRegistrationResponses,
6914
+ useUpdateSelfEventRegistrationQuestionResponse,
6916
6915
  useUpdateSelfImage,
6917
6916
  useUpdateSelfLead,
6918
6917
  useUpdateSelfNotificationPreferences,