@connectedxm/admin 7.0.10 → 7.1.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.js CHANGED
@@ -3872,6 +3872,50 @@ var useGetBookingSpaceSlots = (placeId = "", spaceId = "", firstDayOfMonth, opti
3872
3872
  );
3873
3873
  };
3874
3874
 
3875
+ // src/queries/bookings/useGetBookingSpaceTiers.ts
3876
+ var BOOKING_SPACE_TIERS_QUERY_KEY = (placeId, spaceId) => [...BOOKING_SPACE_QUERY_KEY(placeId, spaceId), "TIERS"];
3877
+ var SET_BOOKING_SPACE_TIERS_QUERY_DATA = (client, keyParams, response) => {
3878
+ client.setQueryData(BOOKING_SPACE_TIERS_QUERY_KEY(...keyParams), response);
3879
+ };
3880
+ var GetBookingSpaceTiers = async ({
3881
+ placeId,
3882
+ spaceId,
3883
+ pageParam,
3884
+ pageSize,
3885
+ orderBy,
3886
+ search,
3887
+ adminApiParams
3888
+ }) => {
3889
+ const adminApi = await GetAdminAPI(adminApiParams);
3890
+ const { data } = await adminApi.get(
3891
+ `/bookings/places/${placeId}/spaces/${spaceId}/tiers`,
3892
+ {
3893
+ params: {
3894
+ page: pageParam || void 0,
3895
+ pageSize: pageSize || void 0,
3896
+ orderBy: orderBy || void 0,
3897
+ search: search || void 0
3898
+ }
3899
+ }
3900
+ );
3901
+ return data;
3902
+ };
3903
+ var useGetBookingSpaceTiers = (placeId = "", spaceId = "", params = {}, options = {}) => {
3904
+ return useConnectedInfiniteQuery(
3905
+ BOOKING_SPACE_TIERS_QUERY_KEY(placeId, spaceId),
3906
+ (params2) => GetBookingSpaceTiers({
3907
+ ...params2,
3908
+ placeId,
3909
+ spaceId
3910
+ }),
3911
+ params,
3912
+ {
3913
+ ...options,
3914
+ enabled: !!placeId && !!spaceId && (options.enabled ?? true)
3915
+ }
3916
+ );
3917
+ };
3918
+
3875
3919
  // src/queries/bookings/useGetBookingSpaceTranslations.ts
3876
3920
  var BOOKING_SPACE_TRANSLATIONS_QUERY_KEY = (placeId, spaceId) => [...BOOKING_SPACE_QUERY_KEY(placeId, spaceId), "TRANSLATIONS"];
3877
3921
  var SET_BOOKING_SPACE_TRANSLATIONS_QUERY_DATA = (client, keyParams, response) => {
@@ -23859,6 +23903,33 @@ var useUpdateBookingSpace = (options = {}) => {
23859
23903
  return useConnectedMutation(UpdateBookingSpace, options);
23860
23904
  };
23861
23905
 
23906
+ // src/mutations/bookings/useAddBookingSpaceTier.ts
23907
+ var AddBookingSpaceTier = async ({
23908
+ placeId,
23909
+ spaceId,
23910
+ tierId,
23911
+ adminApiParams,
23912
+ queryClient
23913
+ }) => {
23914
+ const connectedXM = await GetAdminAPI(adminApiParams);
23915
+ const { data } = await connectedXM.post(
23916
+ `/bookings/places/${placeId}/spaces/${spaceId}/tiers/${tierId}`
23917
+ );
23918
+ if (queryClient && data.status === "ok") {
23919
+ SET_BOOKING_SPACE_QUERY_DATA(queryClient, [placeId, spaceId], data);
23920
+ queryClient.invalidateQueries({
23921
+ queryKey: BOOKING_SPACE_TIERS_QUERY_KEY(placeId, spaceId)
23922
+ });
23923
+ queryClient.invalidateQueries({
23924
+ queryKey: BOOKING_SPACE_QUERY_KEY(placeId, spaceId)
23925
+ });
23926
+ }
23927
+ return data;
23928
+ };
23929
+ var useAddBookingSpaceTier = (options = {}) => {
23930
+ return useConnectedMutation(AddBookingSpaceTier, options);
23931
+ };
23932
+
23862
23933
  // src/mutations/bookings/useCancelBooking.ts
23863
23934
  var CancelBooking = async ({
23864
23935
  placeId,
@@ -23941,6 +24012,33 @@ var useDeleteBooking = (options = {}) => {
23941
24012
  return useConnectedMutation(DeleteBooking, options);
23942
24013
  };
23943
24014
 
24015
+ // src/mutations/bookings/useRemoveBookingSpaceTier.ts
24016
+ var RemoveBookingSpaceTier = async ({
24017
+ placeId,
24018
+ spaceId,
24019
+ tierId,
24020
+ adminApiParams,
24021
+ queryClient
24022
+ }) => {
24023
+ const connectedXM = await GetAdminAPI(adminApiParams);
24024
+ const { data } = await connectedXM.delete(
24025
+ `/bookings/places/${placeId}/spaces/${spaceId}/tiers/${tierId}`
24026
+ );
24027
+ if (queryClient && data.status === "ok") {
24028
+ SET_BOOKING_SPACE_QUERY_DATA(queryClient, [placeId, spaceId], data);
24029
+ queryClient.invalidateQueries({
24030
+ queryKey: BOOKING_SPACE_TIERS_QUERY_KEY(placeId, spaceId)
24031
+ });
24032
+ queryClient.invalidateQueries({
24033
+ queryKey: BOOKING_SPACE_QUERY_KEY(placeId, spaceId)
24034
+ });
24035
+ }
24036
+ return data;
24037
+ };
24038
+ var useRemoveBookingSpaceTier = (options = {}) => {
24039
+ return useConnectedMutation(RemoveBookingSpaceTier, options);
24040
+ };
24041
+
23944
24042
  // src/mutations/bookings/useUpdateBooking.ts
23945
24043
  var UpdateBooking = async ({
23946
24044
  placeId,
@@ -39789,6 +39887,7 @@ export {
39789
39887
  AddAccountGroup,
39790
39888
  AddAccountInterest,
39791
39889
  AddAccountTier,
39890
+ AddBookingSpaceTier,
39792
39891
  AddChannelSubscriber,
39793
39892
  AddCustomReportUser,
39794
39893
  AddEventAccessUser,
@@ -39892,6 +39991,7 @@ export {
39892
39991
  BOOKING_SPACE_QUESTION_TRANSLATIONS_QUERY_KEY,
39893
39992
  BOOKING_SPACE_QUESTION_TRANSLATION_QUERY_KEY,
39894
39993
  BOOKING_SPACE_SLOTS_QUERY_KEY,
39994
+ BOOKING_SPACE_TIERS_QUERY_KEY,
39895
39995
  BOOKING_SPACE_TRANSLATIONS_QUERY_KEY,
39896
39996
  BOOKING_SPACE_TRANSLATION_QUERY_KEY,
39897
39997
  BookingSpaceQuestionType,
@@ -40562,6 +40662,7 @@ export {
40562
40662
  GetBookingSpaceQuestionTranslations,
40563
40663
  GetBookingSpaceQuestions,
40564
40664
  GetBookingSpaceSlots,
40665
+ GetBookingSpaceTiers,
40565
40666
  GetBookingSpaceTranslation,
40566
40667
  GetBookingSpaceTranslations,
40567
40668
  GetBookingSpaces,
@@ -41154,6 +41255,7 @@ export {
41154
41255
  RemoveAccountTier,
41155
41256
  RemoveAllChannelSubscribers,
41156
41257
  RemoveAllGroupMembers,
41258
+ RemoveBookingSpaceTier,
41157
41259
  RemoveChannelSubscriber,
41158
41260
  RemoveCustomReportUser,
41159
41261
  RemoveEventAccessUser,
@@ -41336,6 +41438,7 @@ export {
41336
41438
  SET_BOOKING_SPACE_QUESTION_TRANSLATIONS_QUERY_DATA,
41337
41439
  SET_BOOKING_SPACE_QUESTION_TRANSLATION_QUERY_DATA,
41338
41440
  SET_BOOKING_SPACE_SLOTS_QUERY_DATA,
41441
+ SET_BOOKING_SPACE_TIERS_QUERY_DATA,
41339
41442
  SET_BOOKING_SPACE_TRANSLATIONS_QUERY_DATA,
41340
41443
  SET_BOOKING_SPACE_TRANSLATION_QUERY_DATA,
41341
41444
  SET_CHANNELS_QUERY_DATA,
@@ -42077,6 +42180,7 @@ export {
42077
42180
  useAddAccountGroup,
42078
42181
  useAddAccountInterest,
42079
42182
  useAddAccountTier,
42183
+ useAddBookingSpaceTier,
42080
42184
  useAddChannelSubscriber,
42081
42185
  useAddCustomReportUser,
42082
42186
  useAddEventAccessUser,
@@ -42519,6 +42623,7 @@ export {
42519
42623
  useGetBookingSpaceQuestionTranslations,
42520
42624
  useGetBookingSpaceQuestions,
42521
42625
  useGetBookingSpaceSlots,
42626
+ useGetBookingSpaceTiers,
42522
42627
  useGetBookingSpaceTranslation,
42523
42628
  useGetBookingSpaceTranslations,
42524
42629
  useGetBookingSpaces,
@@ -42992,6 +43097,7 @@ export {
42992
43097
  useRemoveAccountTier,
42993
43098
  useRemoveAllChannelSubscribers,
42994
43099
  useRemoveAllGroupMembers,
43100
+ useRemoveBookingSpaceTier,
42995
43101
  useRemoveChannelSubscriber,
42996
43102
  useRemoveCustomReportUser,
42997
43103
  useRemoveEventAccessUser,
package/openapi.json CHANGED
@@ -11467,6 +11467,256 @@
11467
11467
  ]
11468
11468
  }
11469
11469
  },
11470
+ "/bookings/places/{placeId}/spaces/{spaceId}/tiers": {
11471
+ "get": {
11472
+ "operationId": "GetBookingSpaceTiers",
11473
+ "summary": "Get Booking Space Tiers",
11474
+ "description": "Get Booking Space Tiers endpoint",
11475
+ "parameters": [
11476
+ {
11477
+ "in": "path",
11478
+ "name": "placeId",
11479
+ "schema": {
11480
+ "type": "string"
11481
+ },
11482
+ "description": "The place identifier",
11483
+ "required": true
11484
+ },
11485
+ {
11486
+ "in": "path",
11487
+ "name": "spaceId",
11488
+ "schema": {
11489
+ "type": "string"
11490
+ },
11491
+ "description": "The space identifier",
11492
+ "required": true
11493
+ },
11494
+ {
11495
+ "in": "query",
11496
+ "name": "page",
11497
+ "schema": {
11498
+ "type": "integer",
11499
+ "minimum": 1,
11500
+ "default": 1
11501
+ },
11502
+ "description": "Page number",
11503
+ "required": false
11504
+ },
11505
+ {
11506
+ "in": "query",
11507
+ "name": "pageSize",
11508
+ "schema": {
11509
+ "type": "integer",
11510
+ "minimum": 1,
11511
+ "maximum": 100,
11512
+ "default": 25
11513
+ },
11514
+ "description": "Number of items per page",
11515
+ "required": false
11516
+ },
11517
+ {
11518
+ "in": "query",
11519
+ "name": "orderBy",
11520
+ "schema": {
11521
+ "type": "string"
11522
+ },
11523
+ "description": "Field to order by",
11524
+ "required": false
11525
+ },
11526
+ {
11527
+ "in": "query",
11528
+ "name": "search",
11529
+ "schema": {
11530
+ "type": "string"
11531
+ },
11532
+ "description": "Search query",
11533
+ "required": false
11534
+ }
11535
+ ],
11536
+ "responses": {
11537
+ "200": {
11538
+ "description": "Successful response",
11539
+ "content": {
11540
+ "application/json": {
11541
+ "schema": {
11542
+ "type": "object",
11543
+ "properties": {
11544
+ "status": {
11545
+ "type": "string",
11546
+ "enum": [
11547
+ "ok"
11548
+ ]
11549
+ },
11550
+ "message": {
11551
+ "type": "string",
11552
+ "example": "Success message."
11553
+ },
11554
+ "data": {
11555
+ "type": "array",
11556
+ "items": {
11557
+ "$ref": "#/components/schemas/Tier"
11558
+ }
11559
+ },
11560
+ "count": {
11561
+ "type": "integer",
11562
+ "example": 100
11563
+ }
11564
+ },
11565
+ "required": [
11566
+ "status",
11567
+ "message",
11568
+ "data"
11569
+ ]
11570
+ }
11571
+ }
11572
+ }
11573
+ }
11574
+ },
11575
+ "tags": [
11576
+ "Bookings"
11577
+ ]
11578
+ }
11579
+ },
11580
+ "/bookings/places/{placeId}/spaces/{spaceId}/tiers/{tierId}": {
11581
+ "post": {
11582
+ "operationId": "AddBookingSpaceTier",
11583
+ "summary": "Add Booking Space Tier",
11584
+ "description": "Add Booking Space Tier endpoint",
11585
+ "parameters": [
11586
+ {
11587
+ "in": "path",
11588
+ "name": "placeId",
11589
+ "schema": {
11590
+ "type": "string"
11591
+ },
11592
+ "description": "The place identifier",
11593
+ "required": true
11594
+ },
11595
+ {
11596
+ "in": "path",
11597
+ "name": "spaceId",
11598
+ "schema": {
11599
+ "type": "string"
11600
+ },
11601
+ "description": "The space identifier",
11602
+ "required": true
11603
+ },
11604
+ {
11605
+ "in": "path",
11606
+ "name": "tierId",
11607
+ "schema": {
11608
+ "type": "string"
11609
+ },
11610
+ "description": "The tier identifier",
11611
+ "required": true
11612
+ }
11613
+ ],
11614
+ "responses": {
11615
+ "200": {
11616
+ "description": "Successful response",
11617
+ "content": {
11618
+ "application/json": {
11619
+ "schema": {
11620
+ "type": "object",
11621
+ "properties": {
11622
+ "status": {
11623
+ "type": "string",
11624
+ "enum": [
11625
+ "ok"
11626
+ ]
11627
+ },
11628
+ "message": {
11629
+ "type": "string",
11630
+ "example": "Success message."
11631
+ },
11632
+ "data": {
11633
+ "$ref": "#/components/schemas/BookingSpace"
11634
+ }
11635
+ },
11636
+ "required": [
11637
+ "status",
11638
+ "message",
11639
+ "data"
11640
+ ]
11641
+ }
11642
+ }
11643
+ }
11644
+ }
11645
+ },
11646
+ "tags": [
11647
+ "Bookings"
11648
+ ]
11649
+ },
11650
+ "delete": {
11651
+ "operationId": "RemoveBookingSpaceTier",
11652
+ "summary": "Remove Booking Space Tier",
11653
+ "description": "Remove Booking Space Tier endpoint",
11654
+ "parameters": [
11655
+ {
11656
+ "in": "path",
11657
+ "name": "placeId",
11658
+ "schema": {
11659
+ "type": "string"
11660
+ },
11661
+ "description": "The place identifier",
11662
+ "required": true
11663
+ },
11664
+ {
11665
+ "in": "path",
11666
+ "name": "spaceId",
11667
+ "schema": {
11668
+ "type": "string"
11669
+ },
11670
+ "description": "The space identifier",
11671
+ "required": true
11672
+ },
11673
+ {
11674
+ "in": "path",
11675
+ "name": "tierId",
11676
+ "schema": {
11677
+ "type": "string"
11678
+ },
11679
+ "description": "The tier identifier",
11680
+ "required": true
11681
+ }
11682
+ ],
11683
+ "responses": {
11684
+ "200": {
11685
+ "description": "Successful response",
11686
+ "content": {
11687
+ "application/json": {
11688
+ "schema": {
11689
+ "type": "object",
11690
+ "properties": {
11691
+ "status": {
11692
+ "type": "string",
11693
+ "enum": [
11694
+ "ok"
11695
+ ]
11696
+ },
11697
+ "message": {
11698
+ "type": "string",
11699
+ "example": "Success message."
11700
+ },
11701
+ "data": {
11702
+ "$ref": "#/components/schemas/BookingSpace"
11703
+ }
11704
+ },
11705
+ "required": [
11706
+ "status",
11707
+ "message",
11708
+ "data"
11709
+ ]
11710
+ }
11711
+ }
11712
+ }
11713
+ }
11714
+ },
11715
+ "tags": [
11716
+ "Bookings"
11717
+ ]
11718
+ }
11719
+ },
11470
11720
  "/bookings/places/{placeId}/spaces/{spaceId}/translations": {
11471
11721
  "get": {
11472
11722
  "operationId": "GetBookingSpaceTranslations",
@@ -98717,6 +98967,10 @@
98717
98967
  "type": "string",
98718
98968
  "nullable": true
98719
98969
  },
98970
+ "privacyPolicyLink": {
98971
+ "type": "string",
98972
+ "nullable": true
98973
+ },
98720
98974
  "address1": {
98721
98975
  "type": "string",
98722
98976
  "nullable": true
@@ -98982,6 +99236,7 @@
98982
99236
  "email",
98983
99237
  "description",
98984
99238
  "phone",
99239
+ "privacyPolicyLink",
98985
99240
  "address1",
98986
99241
  "address2",
98987
99242
  "city",
@@ -107989,6 +108244,12 @@
107989
108244
  "type": "number",
107990
108245
  "nullable": true
107991
108246
  },
108247
+ "allowedTiers": {
108248
+ "type": "array",
108249
+ "items": {
108250
+ "$ref": "#/components/schemas/BaseTier"
108251
+ }
108252
+ },
107992
108253
  "createdAt": {
107993
108254
  "type": "string"
107994
108255
  },
@@ -108004,6 +108265,7 @@
108004
108265
  "meetingId",
108005
108266
  "meeting",
108006
108267
  "joinBeforeTime",
108268
+ "allowedTiers",
108007
108269
  "createdAt",
108008
108270
  "updatedAt"
108009
108271
  ]
@@ -117143,6 +117405,10 @@
117143
117405
  "type": "string",
117144
117406
  "nullable": true
117145
117407
  },
117408
+ "privacyPolicyLink": {
117409
+ "type": "string",
117410
+ "nullable": true
117411
+ },
117146
117412
  "address1": {
117147
117413
  "type": "string",
117148
117414
  "nullable": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "7.0.10",
3
+ "version": "7.1.0",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",