@connectedxm/admin 6.7.1 → 6.7.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
@@ -1798,6 +1798,45 @@ var useGetAccountPayments = (accountId = "", params = {}, options = {}) => {
1798
1798
  );
1799
1799
  };
1800
1800
 
1801
+ // src/queries/accounts/useGetAccountRegistrations.ts
1802
+ var ACCOUNT_REGISTRATIONS_QUERY_KEY = (accountId) => [
1803
+ ...ACCOUNT_QUERY_KEY(accountId),
1804
+ "REGISTRATIONS"
1805
+ ];
1806
+ var SET_ACCOUNT_REGISTRATIONS_QUERY_DATA = (client, keyParams, response) => {
1807
+ client.setQueryData(ACCOUNT_REGISTRATIONS_QUERY_KEY(...keyParams), response);
1808
+ };
1809
+ var GetAccountRegistrations = async ({
1810
+ accountId,
1811
+ pageParam,
1812
+ pageSize,
1813
+ orderBy,
1814
+ search,
1815
+ adminApiParams
1816
+ }) => {
1817
+ const adminApi = await GetAdminAPI(adminApiParams);
1818
+ const { data } = await adminApi.get(`/accounts/${accountId}/registrations`, {
1819
+ params: {
1820
+ page: pageParam || void 0,
1821
+ pageSize: pageSize || void 0,
1822
+ orderBy: orderBy || void 0,
1823
+ search: search || void 0
1824
+ }
1825
+ });
1826
+ return data;
1827
+ };
1828
+ var useGetAccountRegistrations = (accountId = "", params = {}, options = {}) => {
1829
+ return useConnectedInfiniteQuery(
1830
+ ACCOUNT_REGISTRATIONS_QUERY_KEY(accountId),
1831
+ (params2) => GetAccountRegistrations({ accountId, ...params2 }),
1832
+ params,
1833
+ {
1834
+ ...options,
1835
+ enabled: !!accountId && (options?.enabled ?? true)
1836
+ }
1837
+ );
1838
+ };
1839
+
1801
1840
  // src/queries/accounts/useGetAccountThreads.ts
1802
1841
  var ACCOUNT_THREADS_QUERY_KEY = (accountId) => {
1803
1842
  const keys = ["THREADS", "ACCOUNT", accountId];
@@ -36023,6 +36062,7 @@ export {
36023
36062
  ACCOUNT_NOTIFICATION_PREFERENCES_QUERY_KEY,
36024
36063
  ACCOUNT_PAYMENTS_QUERY_KEY,
36025
36064
  ACCOUNT_QUERY_KEY,
36065
+ ACCOUNT_REGISTRATIONS_QUERY_KEY,
36026
36066
  ACCOUNT_THREADS_QUERY_KEY,
36027
36067
  ACCOUNT_TIERS_QUERY_KEY,
36028
36068
  ACTIVITIES_QUERY_KEY,
@@ -36708,6 +36748,7 @@ export {
36708
36748
  GetAccountLikes,
36709
36749
  GetAccountNotificationPreferences,
36710
36750
  GetAccountPayments,
36751
+ GetAccountRegistrations,
36711
36752
  GetAccountThreads,
36712
36753
  GetAccountTiers,
36713
36754
  GetAccounts,
@@ -37415,6 +37456,7 @@ export {
37415
37456
  SET_ACCOUNT_PAYMENTS_QUERY_DATA,
37416
37457
  SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
37417
37458
  SET_ACCOUNT_QUERY_DATA,
37459
+ SET_ACCOUNT_REGISTRATIONS_QUERY_DATA,
37418
37460
  SET_ACCOUNT_THREADS_QUERY_DATA,
37419
37461
  SET_ACCOUNT_TIERS_QUERY_DATA,
37420
37462
  SET_ACTIVITIES_QUERY_DATA,
@@ -38511,6 +38553,7 @@ export {
38511
38553
  useGetAccountLikes,
38512
38554
  useGetAccountNotificationPreferences,
38513
38555
  useGetAccountPayments,
38556
+ useGetAccountRegistrations,
38514
38557
  useGetAccountThreads,
38515
38558
  useGetAccountTiers,
38516
38559
  useGetAccounts,
package/openapi.json CHANGED
@@ -3563,6 +3563,104 @@
3563
3563
  ]
3564
3564
  }
3565
3565
  },
3566
+ "/accounts/{accountId}/registrations": {
3567
+ "get": {
3568
+ "operationId": "GetAccountRegistrations",
3569
+ "summary": "Get Account Registrations",
3570
+ "description": "Get Account Registrations endpoint",
3571
+ "parameters": [
3572
+ {
3573
+ "in": "path",
3574
+ "name": "accountId",
3575
+ "schema": {
3576
+ "type": "string"
3577
+ },
3578
+ "description": "The account identifier",
3579
+ "required": true
3580
+ },
3581
+ {
3582
+ "in": "query",
3583
+ "name": "page",
3584
+ "schema": {
3585
+ "type": "integer",
3586
+ "minimum": 1,
3587
+ "default": 1
3588
+ },
3589
+ "description": "Page number",
3590
+ "required": false
3591
+ },
3592
+ {
3593
+ "in": "query",
3594
+ "name": "pageSize",
3595
+ "schema": {
3596
+ "type": "integer",
3597
+ "minimum": 1,
3598
+ "maximum": 100,
3599
+ "default": 25
3600
+ },
3601
+ "description": "Number of items per page",
3602
+ "required": false
3603
+ },
3604
+ {
3605
+ "in": "query",
3606
+ "name": "orderBy",
3607
+ "schema": {
3608
+ "type": "string"
3609
+ },
3610
+ "description": "Field to order by",
3611
+ "required": false
3612
+ },
3613
+ {
3614
+ "in": "query",
3615
+ "name": "search",
3616
+ "schema": {
3617
+ "type": "string"
3618
+ },
3619
+ "description": "Search query",
3620
+ "required": false
3621
+ }
3622
+ ],
3623
+ "responses": {
3624
+ "200": {
3625
+ "description": "Successful response",
3626
+ "content": {
3627
+ "application/json": {
3628
+ "schema": {
3629
+ "type": "object",
3630
+ "properties": {
3631
+ "status": {
3632
+ "type": "string",
3633
+ "enum": [
3634
+ "ok"
3635
+ ]
3636
+ },
3637
+ "message": {
3638
+ "type": "string",
3639
+ "example": "Success message."
3640
+ },
3641
+ "data": {
3642
+ "type": "object"
3643
+ },
3644
+ "count": {
3645
+ "type": "integer",
3646
+ "example": 100
3647
+ }
3648
+ },
3649
+ "required": [
3650
+ "status",
3651
+ "message",
3652
+ "data"
3653
+ ]
3654
+ }
3655
+ }
3656
+ }
3657
+ }
3658
+ },
3659
+ "tags": [
3660
+ "Accounts"
3661
+ ]
3662
+ }
3663
+ },
3566
3664
  "/accounts/{accountId}/threads": {
3567
3665
  "get": {
3568
3666
  "operationId": "GetAccountThreads",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.7.1",
3
+ "version": "6.7.2",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",