@connectedxm/admin 7.2.2 → 7.2.4

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
@@ -1592,6 +1592,45 @@ var useGetAccountActivities = (accountId = "", status, params = {}, options = {}
1592
1592
  );
1593
1593
  };
1594
1594
 
1595
+ // src/queries/accounts/useGetAccountBookings.ts
1596
+ var ACCOUNT_BOOKINGS_QUERY_KEY = (accountId) => [
1597
+ ...ACCOUNT_QUERY_KEY(accountId),
1598
+ "BOOKINGS"
1599
+ ];
1600
+ var SET_ACCOUNT_BOOKINGS_QUERY_DATA = (client, keyParams, response) => {
1601
+ client.setQueryData(ACCOUNT_BOOKINGS_QUERY_KEY(...keyParams), response);
1602
+ };
1603
+ var GetAccountBookings = async ({
1604
+ accountId,
1605
+ pageParam,
1606
+ pageSize,
1607
+ orderBy,
1608
+ search,
1609
+ adminApiParams
1610
+ }) => {
1611
+ const adminApi = await GetAdminAPI(adminApiParams);
1612
+ const { data } = await adminApi.get(`/accounts/${accountId}/bookings`, {
1613
+ params: {
1614
+ page: pageParam || void 0,
1615
+ pageSize: pageSize || void 0,
1616
+ orderBy: orderBy || void 0,
1617
+ search: search || void 0
1618
+ }
1619
+ });
1620
+ return data;
1621
+ };
1622
+ var useGetAccountBookings = (accountId = "", params = {}, options = {}) => {
1623
+ return useConnectedInfiniteQuery(
1624
+ ACCOUNT_BOOKINGS_QUERY_KEY(accountId),
1625
+ (params2) => GetAccountBookings({ accountId, ...params2 }),
1626
+ params,
1627
+ {
1628
+ ...options,
1629
+ enabled: !!accountId && (options?.enabled ?? true)
1630
+ }
1631
+ );
1632
+ };
1633
+
1595
1634
  // src/queries/accounts/useGetAccountComments.ts
1596
1635
  var ACCOUNT_COMMENTS_QUERY_KEY = (accountId) => [
1597
1636
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -1868,6 +1907,51 @@ var useGetAccountRegistrations = (accountId = "", params = {}, options = {}) =>
1868
1907
  );
1869
1908
  };
1870
1909
 
1910
+ // src/queries/accounts/useGetAccountSupportTickets.ts
1911
+ var ACCOUNT_SUPPORT_TICKETS_QUERY_KEY = (accountId) => [
1912
+ ...ACCOUNT_QUERY_KEY(accountId),
1913
+ "SUPPORT_TICKETS"
1914
+ ];
1915
+ var SET_ACCOUNT_SUPPORT_TICKETS_QUERY_DATA = (client, keyParams, response) => {
1916
+ client.setQueryData(
1917
+ ACCOUNT_SUPPORT_TICKETS_QUERY_KEY(...keyParams),
1918
+ response
1919
+ );
1920
+ };
1921
+ var GetAccountSupportTickets = async ({
1922
+ accountId,
1923
+ pageParam,
1924
+ pageSize,
1925
+ orderBy,
1926
+ search,
1927
+ adminApiParams
1928
+ }) => {
1929
+ const adminApi = await GetAdminAPI(adminApiParams);
1930
+ const { data } = await adminApi.get(
1931
+ `/accounts/${accountId}/supportTickets`,
1932
+ {
1933
+ params: {
1934
+ page: pageParam || void 0,
1935
+ pageSize: pageSize || void 0,
1936
+ orderBy: orderBy || void 0,
1937
+ search: search || void 0
1938
+ }
1939
+ }
1940
+ );
1941
+ return data;
1942
+ };
1943
+ var useGetAccountSupportTickets = (accountId = "", params = {}, options = {}) => {
1944
+ return useConnectedInfiniteQuery(
1945
+ ACCOUNT_SUPPORT_TICKETS_QUERY_KEY(accountId),
1946
+ (params2) => GetAccountSupportTickets({ accountId, ...params2 }),
1947
+ params,
1948
+ {
1949
+ ...options,
1950
+ enabled: !!accountId && (options?.enabled ?? true)
1951
+ }
1952
+ );
1953
+ };
1954
+
1871
1955
  // src/queries/accounts/useGetAccountThreads.ts
1872
1956
  var ACCOUNT_THREADS_QUERY_KEY = (accountId) => {
1873
1957
  const keys = ["THREADS", "ACCOUNT", accountId];
@@ -39892,6 +39976,7 @@ export {
39892
39976
  ACCOUNT_ACTIVITIES_QUERY_KEY,
39893
39977
  ACCOUNT_ADDRESSES_QUERY_KEY,
39894
39978
  ACCOUNT_ADDRESS_QUERY_KEY,
39979
+ ACCOUNT_BOOKINGS_QUERY_KEY,
39895
39980
  ACCOUNT_COMMENTS_QUERY_KEY,
39896
39981
  ACCOUNT_EMAILS_QUERY_KEY,
39897
39982
  ACCOUNT_EVENTS_QUERY_KEY,
@@ -39908,6 +39993,7 @@ export {
39908
39993
  ACCOUNT_PAYMENTS_QUERY_KEY,
39909
39994
  ACCOUNT_QUERY_KEY,
39910
39995
  ACCOUNT_REGISTRATIONS_QUERY_KEY,
39996
+ ACCOUNT_SUPPORT_TICKETS_QUERY_KEY,
39911
39997
  ACCOUNT_THREADS_QUERY_KEY,
39912
39998
  ACCOUNT_TIERS_QUERY_KEY,
39913
39999
  ACTIVITIES_QUERY_KEY,
@@ -40650,6 +40736,7 @@ export {
40650
40736
  GetAccountActivities,
40651
40737
  GetAccountAddress,
40652
40738
  GetAccountAddresses,
40739
+ GetAccountBookings,
40653
40740
  GetAccountComments,
40654
40741
  GetAccountEvents,
40655
40742
  GetAccountFollowers,
@@ -40664,6 +40751,7 @@ export {
40664
40751
  GetAccountNotificationPreferences,
40665
40752
  GetAccountPayments,
40666
40753
  GetAccountRegistrations,
40754
+ GetAccountSupportTickets,
40667
40755
  GetAccountThreads,
40668
40756
  GetAccountTiers,
40669
40757
  GetAccounts,
@@ -41424,6 +41512,7 @@ export {
41424
41512
  SET_ACCOUNTS_QUERY_DATA,
41425
41513
  SET_ACCOUNT_ACTIVITIES_QUERY_DATA,
41426
41514
  SET_ACCOUNT_ADDRESSES_QUERY_DATA,
41515
+ SET_ACCOUNT_BOOKINGS_QUERY_DATA,
41427
41516
  SET_ACCOUNT_COMMENTS_QUERY_DATA,
41428
41517
  SET_ACCOUNT_EMAILS_QUERY_DATA,
41429
41518
  SET_ACCOUNT_EVENTS_QUERY_DATA,
@@ -41441,6 +41530,7 @@ export {
41441
41530
  SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
41442
41531
  SET_ACCOUNT_QUERY_DATA,
41443
41532
  SET_ACCOUNT_REGISTRATIONS_QUERY_DATA,
41533
+ SET_ACCOUNT_SUPPORT_TICKETS_QUERY_DATA,
41444
41534
  SET_ACCOUNT_THREADS_QUERY_DATA,
41445
41535
  SET_ACCOUNT_TIERS_QUERY_DATA,
41446
41536
  SET_ACTIVITIES_QUERY_DATA,
@@ -42615,6 +42705,7 @@ export {
42615
42705
  useGetAccountActivities,
42616
42706
  useGetAccountAddress,
42617
42707
  useGetAccountAddresses,
42708
+ useGetAccountBookings,
42618
42709
  useGetAccountComments,
42619
42710
  useGetAccountEvents,
42620
42711
  useGetAccountFollowers,
@@ -42629,6 +42720,7 @@ export {
42629
42720
  useGetAccountNotificationPreferences,
42630
42721
  useGetAccountPayments,
42631
42722
  useGetAccountRegistrations,
42723
+ useGetAccountSupportTickets,
42632
42724
  useGetAccountThreads,
42633
42725
  useGetAccountTiers,
42634
42726
  useGetAccounts,
package/openapi.json CHANGED
@@ -1875,6 +1875,107 @@
1875
1875
  ]
1876
1876
  }
1877
1877
  },
1878
+ "/accounts/{accountId}/bookings": {
1879
+ "get": {
1880
+ "operationId": "GetAccountBookings",
1881
+ "summary": "Get Account Bookings",
1882
+ "description": "Get Account Bookings endpoint",
1883
+ "parameters": [
1884
+ {
1885
+ "in": "path",
1886
+ "name": "accountId",
1887
+ "schema": {
1888
+ "type": "string"
1889
+ },
1890
+ "description": "The account identifier",
1891
+ "required": true
1892
+ },
1893
+ {
1894
+ "in": "query",
1895
+ "name": "page",
1896
+ "schema": {
1897
+ "type": "integer",
1898
+ "minimum": 1,
1899
+ "default": 1
1900
+ },
1901
+ "description": "Page number",
1902
+ "required": false
1903
+ },
1904
+ {
1905
+ "in": "query",
1906
+ "name": "pageSize",
1907
+ "schema": {
1908
+ "type": "integer",
1909
+ "minimum": 1,
1910
+ "maximum": 100,
1911
+ "default": 25
1912
+ },
1913
+ "description": "Number of items per page",
1914
+ "required": false
1915
+ },
1916
+ {
1917
+ "in": "query",
1918
+ "name": "orderBy",
1919
+ "schema": {
1920
+ "type": "string"
1921
+ },
1922
+ "description": "Field to order by",
1923
+ "required": false
1924
+ },
1925
+ {
1926
+ "in": "query",
1927
+ "name": "search",
1928
+ "schema": {
1929
+ "type": "string"
1930
+ },
1931
+ "description": "Search query",
1932
+ "required": false
1933
+ }
1934
+ ],
1935
+ "responses": {
1936
+ "200": {
1937
+ "description": "Successful response",
1938
+ "content": {
1939
+ "application/json": {
1940
+ "schema": {
1941
+ "type": "object",
1942
+ "properties": {
1943
+ "status": {
1944
+ "type": "string",
1945
+ "enum": [
1946
+ "ok"
1947
+ ]
1948
+ },
1949
+ "message": {
1950
+ "type": "string",
1951
+ "example": "Success message."
1952
+ },
1953
+ "data": {
1954
+ "type": "array",
1955
+ "items": {
1956
+ "$ref": "#/components/schemas/Booking"
1957
+ }
1958
+ },
1959
+ "count": {
1960
+ "type": "integer",
1961
+ "example": 100
1962
+ }
1963
+ },
1964
+ "required": [
1965
+ "status",
1966
+ "message",
1967
+ "data"
1968
+ ]
1969
+ }
1970
+ }
1971
+ }
1972
+ }
1973
+ },
1974
+ "tags": [
1975
+ "Accounts"
1976
+ ]
1977
+ }
1978
+ },
1878
1979
  "/accounts/{accountId}/comments": {
1879
1980
  "get": {
1880
1981
  "operationId": "GetAccountComments",
@@ -3971,6 +4072,107 @@
3971
4072
  ]
3972
4073
  }
3973
4074
  },
4075
+ "/accounts/{accountId}/supportTickets": {
4076
+ "get": {
4077
+ "operationId": "GetAccountSupportTickets",
4078
+ "summary": "Get Account Support Tickets",
4079
+ "description": "Get Account Support Tickets endpoint",
4080
+ "parameters": [
4081
+ {
4082
+ "in": "path",
4083
+ "name": "accountId",
4084
+ "schema": {
4085
+ "type": "string"
4086
+ },
4087
+ "description": "The account identifier",
4088
+ "required": true
4089
+ },
4090
+ {
4091
+ "in": "query",
4092
+ "name": "page",
4093
+ "schema": {
4094
+ "type": "integer",
4095
+ "minimum": 1,
4096
+ "default": 1
4097
+ },
4098
+ "description": "Page number",
4099
+ "required": false
4100
+ },
4101
+ {
4102
+ "in": "query",
4103
+ "name": "pageSize",
4104
+ "schema": {
4105
+ "type": "integer",
4106
+ "minimum": 1,
4107
+ "maximum": 100,
4108
+ "default": 25
4109
+ },
4110
+ "description": "Number of items per page",
4111
+ "required": false
4112
+ },
4113
+ {
4114
+ "in": "query",
4115
+ "name": "orderBy",
4116
+ "schema": {
4117
+ "type": "string"
4118
+ },
4119
+ "description": "Field to order by",
4120
+ "required": false
4121
+ },
4122
+ {
4123
+ "in": "query",
4124
+ "name": "search",
4125
+ "schema": {
4126
+ "type": "string"
4127
+ },
4128
+ "description": "Search query",
4129
+ "required": false
4130
+ }
4131
+ ],
4132
+ "responses": {
4133
+ "200": {
4134
+ "description": "Successful response",
4135
+ "content": {
4136
+ "application/json": {
4137
+ "schema": {
4138
+ "type": "object",
4139
+ "properties": {
4140
+ "status": {
4141
+ "type": "string",
4142
+ "enum": [
4143
+ "ok"
4144
+ ]
4145
+ },
4146
+ "message": {
4147
+ "type": "string",
4148
+ "example": "Success message."
4149
+ },
4150
+ "data": {
4151
+ "type": "array",
4152
+ "items": {
4153
+ "$ref": "#/components/schemas/SupportTicket"
4154
+ }
4155
+ },
4156
+ "count": {
4157
+ "type": "integer",
4158
+ "example": 100
4159
+ }
4160
+ },
4161
+ "required": [
4162
+ "status",
4163
+ "message",
4164
+ "data"
4165
+ ]
4166
+ }
4167
+ }
4168
+ }
4169
+ }
4170
+ },
4171
+ "tags": [
4172
+ "Accounts"
4173
+ ]
4174
+ }
4175
+ },
3974
4176
  "/accounts/{accountId}/sync": {
3975
4177
  "post": {
3976
4178
  "operationId": "SyncAccount",
@@ -109049,6 +109251,9 @@
109049
109251
  "items": {
109050
109252
  "$ref": "#/components/schemas/BaseBookingQuestionResponse"
109051
109253
  }
109254
+ },
109255
+ "place": {
109256
+ "$ref": "#/components/schemas/BaseBookingPlace"
109052
109257
  }
109053
109258
  },
109054
109259
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "7.2.2",
3
+ "version": "7.2.4",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",