@connectedxm/admin 7.2.2 → 7.2.3

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
@@ -1868,6 +1868,45 @@ var useGetAccountRegistrations = (accountId = "", params = {}, options = {}) =>
1868
1868
  );
1869
1869
  };
1870
1870
 
1871
+ // src/queries/accounts/useGetAccountBookings.ts
1872
+ var ACCOUNT_BOOKINGS_QUERY_KEY = (accountId) => [
1873
+ ...ACCOUNT_QUERY_KEY(accountId),
1874
+ "BOOKINGS"
1875
+ ];
1876
+ var SET_ACCOUNT_BOOKINGS_QUERY_DATA = (client, keyParams, response) => {
1877
+ client.setQueryData(ACCOUNT_BOOKINGS_QUERY_KEY(...keyParams), response);
1878
+ };
1879
+ var GetAccountBookings = async ({
1880
+ accountId,
1881
+ pageParam,
1882
+ pageSize,
1883
+ orderBy,
1884
+ search,
1885
+ adminApiParams
1886
+ }) => {
1887
+ const adminApi = await GetAdminAPI(adminApiParams);
1888
+ const { data } = await adminApi.get(`/accounts/${accountId}/bookings`, {
1889
+ params: {
1890
+ page: pageParam || void 0,
1891
+ pageSize: pageSize || void 0,
1892
+ orderBy: orderBy || void 0,
1893
+ search: search || void 0
1894
+ }
1895
+ });
1896
+ return data;
1897
+ };
1898
+ var useGetAccountBookings = (accountId = "", params = {}, options = {}) => {
1899
+ return useConnectedInfiniteQuery(
1900
+ ACCOUNT_BOOKINGS_QUERY_KEY(accountId),
1901
+ (params2) => GetAccountBookings({ accountId, ...params2 }),
1902
+ params,
1903
+ {
1904
+ ...options,
1905
+ enabled: !!accountId && (options?.enabled ?? true)
1906
+ }
1907
+ );
1908
+ };
1909
+
1871
1910
  // src/queries/accounts/useGetAccountThreads.ts
1872
1911
  var ACCOUNT_THREADS_QUERY_KEY = (accountId) => {
1873
1912
  const keys = ["THREADS", "ACCOUNT", accountId];
@@ -39892,6 +39931,7 @@ export {
39892
39931
  ACCOUNT_ACTIVITIES_QUERY_KEY,
39893
39932
  ACCOUNT_ADDRESSES_QUERY_KEY,
39894
39933
  ACCOUNT_ADDRESS_QUERY_KEY,
39934
+ ACCOUNT_BOOKINGS_QUERY_KEY,
39895
39935
  ACCOUNT_COMMENTS_QUERY_KEY,
39896
39936
  ACCOUNT_EMAILS_QUERY_KEY,
39897
39937
  ACCOUNT_EVENTS_QUERY_KEY,
@@ -40650,6 +40690,7 @@ export {
40650
40690
  GetAccountActivities,
40651
40691
  GetAccountAddress,
40652
40692
  GetAccountAddresses,
40693
+ GetAccountBookings,
40653
40694
  GetAccountComments,
40654
40695
  GetAccountEvents,
40655
40696
  GetAccountFollowers,
@@ -41424,6 +41465,7 @@ export {
41424
41465
  SET_ACCOUNTS_QUERY_DATA,
41425
41466
  SET_ACCOUNT_ACTIVITIES_QUERY_DATA,
41426
41467
  SET_ACCOUNT_ADDRESSES_QUERY_DATA,
41468
+ SET_ACCOUNT_BOOKINGS_QUERY_DATA,
41427
41469
  SET_ACCOUNT_COMMENTS_QUERY_DATA,
41428
41470
  SET_ACCOUNT_EMAILS_QUERY_DATA,
41429
41471
  SET_ACCOUNT_EVENTS_QUERY_DATA,
@@ -42615,6 +42657,7 @@ export {
42615
42657
  useGetAccountActivities,
42616
42658
  useGetAccountAddress,
42617
42659
  useGetAccountAddresses,
42660
+ useGetAccountBookings,
42618
42661
  useGetAccountComments,
42619
42662
  useGetAccountEvents,
42620
42663
  useGetAccountFollowers,
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",
@@ -109049,6 +109150,9 @@
109049
109150
  "items": {
109050
109151
  "$ref": "#/components/schemas/BaseBookingQuestionResponse"
109051
109152
  }
109153
+ },
109154
+ "place": {
109155
+ "$ref": "#/components/schemas/BaseBookingPlace"
109052
109156
  }
109053
109157
  },
109054
109158
  "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.3",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",