@connectedxm/admin 6.23.1 → 6.23.2

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.js CHANGED
@@ -489,6 +489,7 @@ var InvoiceStatus = /* @__PURE__ */ ((InvoiceStatus2) => {
489
489
  var PurchaseStatus = /* @__PURE__ */ ((PurchaseStatus2) => {
490
490
  PurchaseStatus2["draft"] = "draft";
491
491
  PurchaseStatus2["canceled"] = "canceled";
492
+ PurchaseStatus2["pending"] = "pending";
492
493
  PurchaseStatus2["needsInfo"] = "needsInfo";
493
494
  PurchaseStatus2["ready"] = "ready";
494
495
  return PurchaseStatus2;
@@ -6704,6 +6705,44 @@ var useGetEventPassTransferLogs = (eventId = "", passId = "", params = {}, optio
6704
6705
  );
6705
6706
  };
6706
6707
 
6708
+ // src/queries/events/passes/useGetEventPendingPasses.ts
6709
+ var EVENT_PENDING_PASSES_QUERY_KEY = (eventId) => {
6710
+ return [...EVENT_QUERY_KEY(eventId), "PASSES", "PENDING"];
6711
+ };
6712
+ var GetEventPendingPasses = async ({
6713
+ eventId,
6714
+ pageParam,
6715
+ pageSize,
6716
+ orderBy,
6717
+ search,
6718
+ adminApiParams
6719
+ }) => {
6720
+ const adminApi = await GetAdminAPI(adminApiParams);
6721
+ const { data } = await adminApi.get(`/events/${eventId}/passes/pending`, {
6722
+ params: {
6723
+ page: pageParam || void 0,
6724
+ pageSize: pageSize || void 0,
6725
+ orderBy: orderBy || void 0,
6726
+ search: search || void 0
6727
+ }
6728
+ });
6729
+ return data;
6730
+ };
6731
+ var useGetEventPendingPasses = (eventId = "", params = {}, options = {}) => {
6732
+ return useConnectedInfiniteQuery(
6733
+ EVENT_PENDING_PASSES_QUERY_KEY(eventId),
6734
+ (params2) => GetEventPendingPasses({
6735
+ ...params2,
6736
+ eventId
6737
+ }),
6738
+ params,
6739
+ {
6740
+ ...options,
6741
+ enabled: !!eventId && (options.enabled ?? true)
6742
+ }
6743
+ );
6744
+ };
6745
+
6707
6746
  // src/queries/events/attendees/useGetEventPassAttendeePasses.ts
6708
6747
  var EVENT_PASS_ATTENDEE_PASSES_QUERY_KEY = (eventId, passId, status) => {
6709
6748
  const key = [...EVENT_PASSES_QUERY_KEY(eventId), passId, "ATTENDEE_PASSES"];
@@ -28331,6 +28370,53 @@ var useUpdateEventPassResponses = (options = {}) => {
28331
28370
  return useConnectedMutation(UpdateEventPassResponses, options);
28332
28371
  };
28333
28372
 
28373
+ // src/mutations/events/passes/useApproveEventPass.ts
28374
+ var ApproveEventPass = async ({
28375
+ eventId,
28376
+ passId,
28377
+ sendEmail,
28378
+ adminApiParams,
28379
+ queryClient
28380
+ }) => {
28381
+ const connectedXM = await GetAdminAPI(adminApiParams);
28382
+ const { data } = await connectedXM.put(
28383
+ `/events/${eventId}/passes/${passId}/approve`,
28384
+ { sendEmail }
28385
+ );
28386
+ if (queryClient && data.status === "ok") {
28387
+ if (data.data.ticketId) {
28388
+ queryClient.invalidateQueries({
28389
+ queryKey: EVENT_PASS_TYPE_PASSES_QUERY_KEY(eventId, data.data.ticketId)
28390
+ });
28391
+ }
28392
+ if (data.data.attendee) {
28393
+ queryClient.invalidateQueries({
28394
+ queryKey: EVENT_ATTENDEE_QUERY_KEY(
28395
+ eventId,
28396
+ data.data.attendee.accountId
28397
+ )
28398
+ });
28399
+ queryClient.invalidateQueries({
28400
+ queryKey: EVENT_ATTENDEE_PASSES_QUERY_KEY(
28401
+ eventId,
28402
+ data.data.attendee.accountId
28403
+ )
28404
+ });
28405
+ }
28406
+ queryClient.invalidateQueries({
28407
+ queryKey: EVENT_PASSES_QUERY_KEY(eventId)
28408
+ });
28409
+ queryClient.invalidateQueries({
28410
+ queryKey: EVENT_PENDING_PASSES_QUERY_KEY(eventId)
28411
+ });
28412
+ SET_EVENT_PASS_QUERY_DATA(queryClient, [eventId, passId], data);
28413
+ }
28414
+ return data;
28415
+ };
28416
+ var useApproveEventPass = (options = {}) => {
28417
+ return useConnectedMutation(ApproveEventPass, options);
28418
+ };
28419
+
28334
28420
  // src/mutations/events/passes/useCancelEventPass.ts
28335
28421
  var CancelEventPass = async ({
28336
28422
  eventId,
@@ -28479,6 +28565,54 @@ var useDeleteEventPass = (options = {}) => {
28479
28565
  return useConnectedMutation(DeleteEventPass, options);
28480
28566
  };
28481
28567
 
28568
+ // src/mutations/events/passes/useDenyEventPass.ts
28569
+ var DenyEventPass = async ({
28570
+ eventId,
28571
+ passId,
28572
+ sendEmail,
28573
+ refund,
28574
+ adminApiParams,
28575
+ queryClient
28576
+ }) => {
28577
+ const connectedXM = await GetAdminAPI(adminApiParams);
28578
+ const { data } = await connectedXM.put(
28579
+ `/events/${eventId}/passes/${passId}/deny`,
28580
+ { sendEmail, refund }
28581
+ );
28582
+ if (queryClient && data.status === "ok") {
28583
+ if (data.data.ticketId) {
28584
+ queryClient.invalidateQueries({
28585
+ queryKey: EVENT_PASS_TYPE_PASSES_QUERY_KEY(eventId, data.data.ticketId)
28586
+ });
28587
+ }
28588
+ if (data.data.attendee) {
28589
+ queryClient.invalidateQueries({
28590
+ queryKey: EVENT_ATTENDEE_QUERY_KEY(
28591
+ eventId,
28592
+ data.data.attendee.accountId
28593
+ )
28594
+ });
28595
+ queryClient.invalidateQueries({
28596
+ queryKey: EVENT_ATTENDEE_PASSES_QUERY_KEY(
28597
+ eventId,
28598
+ data.data.attendee.accountId
28599
+ )
28600
+ });
28601
+ }
28602
+ queryClient.invalidateQueries({
28603
+ queryKey: EVENT_PASSES_QUERY_KEY(eventId)
28604
+ });
28605
+ queryClient.invalidateQueries({
28606
+ queryKey: EVENT_PENDING_PASSES_QUERY_KEY(eventId)
28607
+ });
28608
+ SET_EVENT_PASS_QUERY_DATA(queryClient, [eventId, passId], data);
28609
+ }
28610
+ return data;
28611
+ };
28612
+ var useDenyEventPass = (options = {}) => {
28613
+ return useConnectedMutation(DenyEventPass, options);
28614
+ };
28615
+
28482
28616
  // src/mutations/events/passes/useIndexEventPasses.ts
28483
28617
  var IndexEventPasses = async ({
28484
28618
  eventId,
@@ -39069,6 +39203,7 @@ export {
39069
39203
  AdminNotificationType,
39070
39204
  AdvertisementType,
39071
39205
  AppendInfiniteQuery,
39206
+ ApproveEventPass,
39072
39207
  ArchiveActivity,
39073
39208
  AttachBookingSpaceQuestionSearchList,
39074
39209
  AttachEventQuestionSearchList,
@@ -39426,6 +39561,7 @@ export {
39426
39561
  DeleteUserImage,
39427
39562
  DeleteVideo,
39428
39563
  DeleteVideoCaption,
39564
+ DenyEventPass,
39429
39565
  DetachBookingSpaceQuestionSearchList,
39430
39566
  DetachEventQuestionSearchList,
39431
39567
  DetachEventSessionQuestionSearchList,
@@ -39538,6 +39674,7 @@ export {
39538
39674
  EVENT_PASS_TYPE_TRANSLATIONS_QUERY_KEY,
39539
39675
  EVENT_PASS_TYPE_TRANSLATION_QUERY_KEY,
39540
39676
  EVENT_PAYMENTS_QUERY_KEY,
39677
+ EVENT_PENDING_PASSES_QUERY_KEY,
39541
39678
  EVENT_QUERY_KEY,
39542
39679
  EVENT_QUESTIONS_QUERY_KEY,
39543
39680
  EVENT_QUESTION_CHOICES_QUERY_KEY,
@@ -39898,6 +40035,7 @@ export {
39898
40035
  GetEventPassTypes,
39899
40036
  GetEventPasses,
39900
40037
  GetEventPayments,
40038
+ GetEventPendingPasses,
39901
40039
  GetEventQuestion,
39902
40040
  GetEventQuestionChoice,
39903
40041
  GetEventQuestionChoiceSubQuestions,
@@ -41320,6 +41458,7 @@ export {
41320
41458
  useAddSurveyQuestionChoiceSubQuestion,
41321
41459
  useAddSurveySectionQuestion,
41322
41460
  useAddSurveySession,
41461
+ useApproveEventPass,
41323
41462
  useArchiveActivity,
41324
41463
  useAttachBookingSpaceQuestionSearchList,
41325
41464
  useAttachEventQuestionSearchList,
@@ -41608,6 +41747,7 @@ export {
41608
41747
  useDeleteUserImage,
41609
41748
  useDeleteVideo,
41610
41749
  useDeleteVideoCaption,
41750
+ useDenyEventPass,
41611
41751
  useDetachBookingSpaceQuestionSearchList,
41612
41752
  useDetachEventQuestionSearchList,
41613
41753
  useDetachEventSessionQuestionSearchList,
@@ -41829,6 +41969,7 @@ export {
41829
41969
  useGetEventPassTypes,
41830
41970
  useGetEventPasses,
41831
41971
  useGetEventPayments,
41972
+ useGetEventPendingPasses,
41832
41973
  useGetEventQuestion,
41833
41974
  useGetEventQuestionChoice,
41834
41975
  useGetEventQuestionChoiceSubQuestions,
package/openapi.json CHANGED
@@ -33787,6 +33787,107 @@
33787
33787
  ]
33788
33788
  }
33789
33789
  },
33790
+ "/events/{eventId}/passes/pending": {
33791
+ "get": {
33792
+ "operationId": "GetEventPendingPasses",
33793
+ "summary": "Get Event Pending Passes",
33794
+ "description": "Get Event Pending Passes endpoint",
33795
+ "parameters": [
33796
+ {
33797
+ "in": "path",
33798
+ "name": "eventId",
33799
+ "schema": {
33800
+ "type": "string"
33801
+ },
33802
+ "description": "The event identifier",
33803
+ "required": true
33804
+ },
33805
+ {
33806
+ "in": "query",
33807
+ "name": "page",
33808
+ "schema": {
33809
+ "type": "integer",
33810
+ "minimum": 1,
33811
+ "default": 1
33812
+ },
33813
+ "description": "Page number",
33814
+ "required": false
33815
+ },
33816
+ {
33817
+ "in": "query",
33818
+ "name": "pageSize",
33819
+ "schema": {
33820
+ "type": "integer",
33821
+ "minimum": 1,
33822
+ "maximum": 100,
33823
+ "default": 25
33824
+ },
33825
+ "description": "Number of items per page",
33826
+ "required": false
33827
+ },
33828
+ {
33829
+ "in": "query",
33830
+ "name": "orderBy",
33831
+ "schema": {
33832
+ "type": "string"
33833
+ },
33834
+ "description": "Field to order by",
33835
+ "required": false
33836
+ },
33837
+ {
33838
+ "in": "query",
33839
+ "name": "search",
33840
+ "schema": {
33841
+ "type": "string"
33842
+ },
33843
+ "description": "Search query",
33844
+ "required": false
33845
+ }
33846
+ ],
33847
+ "responses": {
33848
+ "200": {
33849
+ "description": "Successful response",
33850
+ "content": {
33851
+ "application/json": {
33852
+ "schema": {
33853
+ "type": "object",
33854
+ "properties": {
33855
+ "status": {
33856
+ "type": "string",
33857
+ "enum": [
33858
+ "ok"
33859
+ ]
33860
+ },
33861
+ "message": {
33862
+ "type": "string",
33863
+ "example": "Success message."
33864
+ },
33865
+ "data": {
33866
+ "type": "array",
33867
+ "items": {
33868
+ "$ref": "#/components/schemas/EventPass"
33869
+ }
33870
+ },
33871
+ "count": {
33872
+ "type": "integer",
33873
+ "example": 100
33874
+ }
33875
+ },
33876
+ "required": [
33877
+ "status",
33878
+ "message",
33879
+ "data"
33880
+ ]
33881
+ }
33882
+ }
33883
+ }
33884
+ }
33885
+ },
33886
+ "tags": [
33887
+ "Events::Passes"
33888
+ ]
33889
+ }
33890
+ },
33790
33891
  "/events/{eventId}/passes/ready": {
33791
33892
  "post": {
33792
33893
  "operationId": "UpdateEventPassesReady",
@@ -34401,6 +34502,77 @@
34401
34502
  ]
34402
34503
  }
34403
34504
  },
34505
+ "/events/{eventId}/passes/{passId}/approve": {
34506
+ "put": {
34507
+ "operationId": "ApproveEventPass",
34508
+ "summary": "Approve Event Pass",
34509
+ "description": "Approve Event Pass endpoint",
34510
+ "parameters": [
34511
+ {
34512
+ "in": "path",
34513
+ "name": "eventId",
34514
+ "schema": {
34515
+ "type": "string"
34516
+ },
34517
+ "description": "The event identifier",
34518
+ "required": true
34519
+ },
34520
+ {
34521
+ "in": "path",
34522
+ "name": "passId",
34523
+ "schema": {
34524
+ "type": "string"
34525
+ },
34526
+ "description": "The pass identifier",
34527
+ "required": true
34528
+ },
34529
+ {
34530
+ "in": "query",
34531
+ "name": "sendEmail",
34532
+ "schema": {
34533
+ "type": "boolean"
34534
+ },
34535
+ "description": "Filter by sendEmail",
34536
+ "required": false
34537
+ }
34538
+ ],
34539
+ "responses": {
34540
+ "200": {
34541
+ "description": "Successful response",
34542
+ "content": {
34543
+ "application/json": {
34544
+ "schema": {
34545
+ "type": "object",
34546
+ "properties": {
34547
+ "status": {
34548
+ "type": "string",
34549
+ "enum": [
34550
+ "ok"
34551
+ ]
34552
+ },
34553
+ "message": {
34554
+ "type": "string",
34555
+ "example": "Success message."
34556
+ },
34557
+ "data": {
34558
+ "$ref": "#/components/schemas/EventPass"
34559
+ }
34560
+ },
34561
+ "required": [
34562
+ "status",
34563
+ "message",
34564
+ "data"
34565
+ ]
34566
+ }
34567
+ }
34568
+ }
34569
+ }
34570
+ },
34571
+ "tags": [
34572
+ "Events::Passes"
34573
+ ]
34574
+ }
34575
+ },
34404
34576
  "/events/{eventId}/passes/{passId}/attendee/passes": {
34405
34577
  "get": {
34406
34578
  "operationId": "GetEventPassAttendeePasses",
@@ -34969,6 +35141,86 @@
34969
35141
  ]
34970
35142
  }
34971
35143
  },
35144
+ "/events/{eventId}/passes/{passId}/deny": {
35145
+ "put": {
35146
+ "operationId": "DenyEventPass",
35147
+ "summary": "Deny Event Pass",
35148
+ "description": "Deny Event Pass endpoint",
35149
+ "parameters": [
35150
+ {
35151
+ "in": "path",
35152
+ "name": "eventId",
35153
+ "schema": {
35154
+ "type": "string"
35155
+ },
35156
+ "description": "The event identifier",
35157
+ "required": true
35158
+ },
35159
+ {
35160
+ "in": "path",
35161
+ "name": "passId",
35162
+ "schema": {
35163
+ "type": "string"
35164
+ },
35165
+ "description": "The pass identifier",
35166
+ "required": true
35167
+ },
35168
+ {
35169
+ "in": "query",
35170
+ "name": "sendEmail",
35171
+ "schema": {
35172
+ "type": "boolean"
35173
+ },
35174
+ "description": "Filter by sendEmail",
35175
+ "required": false
35176
+ },
35177
+ {
35178
+ "in": "query",
35179
+ "name": "refund",
35180
+ "schema": {
35181
+ "type": "boolean"
35182
+ },
35183
+ "description": "Filter by refund",
35184
+ "required": false
35185
+ }
35186
+ ],
35187
+ "responses": {
35188
+ "200": {
35189
+ "description": "Successful response",
35190
+ "content": {
35191
+ "application/json": {
35192
+ "schema": {
35193
+ "type": "object",
35194
+ "properties": {
35195
+ "status": {
35196
+ "type": "string",
35197
+ "enum": [
35198
+ "ok"
35199
+ ]
35200
+ },
35201
+ "message": {
35202
+ "type": "string",
35203
+ "example": "Success message."
35204
+ },
35205
+ "data": {
35206
+ "$ref": "#/components/schemas/EventPass"
35207
+ }
35208
+ },
35209
+ "required": [
35210
+ "status",
35211
+ "message",
35212
+ "data"
35213
+ ]
35214
+ }
35215
+ }
35216
+ }
35217
+ }
35218
+ },
35219
+ "tags": [
35220
+ "Events::Passes"
35221
+ ]
35222
+ }
35223
+ },
34972
35224
  "/events/{eventId}/passes/{passId}/matches": {
34973
35225
  "get": {
34974
35226
  "operationId": "GetEventPassMatches",
@@ -97083,6 +97335,7 @@
97083
97335
  "enum": [
97084
97336
  "draft",
97085
97337
  "canceled",
97338
+ "pending",
97086
97339
  "needsInfo",
97087
97340
  "ready"
97088
97341
  ]
@@ -103263,6 +103516,9 @@
103263
103516
  "requiredPassTypeId": {
103264
103517
  "type": "string",
103265
103518
  "nullable": true
103519
+ },
103520
+ "requiresApproval": {
103521
+ "type": "boolean"
103266
103522
  }
103267
103523
  },
103268
103524
  "required": [
@@ -103293,7 +103549,8 @@
103293
103549
  "taxLocation",
103294
103550
  "createdAt",
103295
103551
  "updatedAt",
103296
- "requiredPassTypeId"
103552
+ "requiredPassTypeId",
103553
+ "requiresApproval"
103297
103554
  ]
103298
103555
  },
103299
103556
  "EventPassType": {
@@ -116485,6 +116742,9 @@
116485
116742
  "badgeColor": {
116486
116743
  "type": "string",
116487
116744
  "nullable": true
116745
+ },
116746
+ "requiresApproval": {
116747
+ "type": "boolean"
116488
116748
  }
116489
116749
  },
116490
116750
  "required": [
@@ -116655,6 +116915,10 @@
116655
116915
  "badgeColor": {
116656
116916
  "type": "string",
116657
116917
  "nullable": true
116918
+ },
116919
+ "requiresApproval": {
116920
+ "type": "boolean",
116921
+ "nullable": true
116658
116922
  }
116659
116923
  }
116660
116924
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.23.1",
3
+ "version": "6.23.2",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",