@connectedxm/admin 3.2.2 → 3.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
@@ -973,77 +973,6 @@ var useGetAccountPayments = (accountId = "", params = {}, options = {}) => {
973
973
  );
974
974
  };
975
975
 
976
- // src/queries/accounts/useGetAccountPushDevices.ts
977
- var ACCOUNT_PUSH_DEVICES_QUERY_KEY = (accountId) => {
978
- const key = [...ACCOUNT_QUERY_KEY(accountId), "PUSH_DEVICES"];
979
- return key;
980
- };
981
- var SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA = (client, keyParams, response) => {
982
- client.setQueryData(ACCOUNT_PUSH_DEVICES_QUERY_KEY(...keyParams), response);
983
- };
984
- var GetAccountPushDevices = async ({
985
- accountId,
986
- pageParam,
987
- pageSize,
988
- orderBy,
989
- search,
990
- adminApiParams
991
- }) => {
992
- const adminApi = await GetAdminAPI(adminApiParams);
993
- const { data } = await adminApi.get(`/accounts/${accountId}/push-devices`, {
994
- params: {
995
- page: pageParam || void 0,
996
- pageSize: pageSize || void 0,
997
- orderBy: orderBy || void 0,
998
- search: search || void 0
999
- }
1000
- });
1001
- return data;
1002
- };
1003
- var useGetAccountPushDevices = (accountId = "", params = {}, options = {}) => {
1004
- return useConnectedInfiniteQuery(
1005
- ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId),
1006
- (params2) => GetAccountPushDevices({
1007
- ...params2,
1008
- accountId
1009
- }),
1010
- params,
1011
- {
1012
- ...options,
1013
- enabled: !!accountId && (options?.enabled ?? true)
1014
- },
1015
- "accounts"
1016
- );
1017
- };
1018
-
1019
- // src/queries/accounts/useGetAccountPushDevice.ts
1020
- var ACCOUNT_PUSH_DEVICE_QUERY_KEY = (accountId, pushDeviceId) => [...ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId), pushDeviceId];
1021
- var SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response) => {
1022
- client.setQueryData(ACCOUNT_PUSH_DEVICE_QUERY_KEY(...keyParams), response);
1023
- };
1024
- var GetAccountPushDevice = async ({
1025
- accountId = "",
1026
- pushDeviceId = "",
1027
- adminApiParams
1028
- }) => {
1029
- const adminApi = await GetAdminAPI(adminApiParams);
1030
- const { data } = await adminApi.get(
1031
- `/accounts/${accountId}/push-devices/${pushDeviceId}`
1032
- );
1033
- return data;
1034
- };
1035
- var useGetAccountPushDevice = (accountId = "", pushDeviceId = "", options = {}) => {
1036
- return useConnectedSingleQuery(
1037
- ACCOUNT_PUSH_DEVICE_QUERY_KEY(accountId, pushDeviceId),
1038
- (params) => GetAccountPushDevice({ accountId, pushDeviceId, ...params }),
1039
- {
1040
- ...options,
1041
- enabled: !!accountId && !!pushDeviceId && (options?.enabled ?? true)
1042
- },
1043
- "accounts"
1044
- );
1045
- };
1046
-
1047
976
  // src/queries/accounts/useGetAccountSubscriptions.ts
1048
977
  var ACCOUNT_SUBSCRIPTIONS_QUERY_KEY = (accountId) => [
1049
978
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -14873,6 +14802,43 @@ var useGetLoginAccounts = (username = "", params = {}, options = {}) => {
14873
14802
  );
14874
14803
  };
14875
14804
 
14805
+ // src/queries/logins/useGetLoginDevices.ts
14806
+ var LOGIN_DEVICES_QUERY_KEY = (username) => [
14807
+ ...LOGIN_QUERY_KEY(username),
14808
+ "DEVICES"
14809
+ ];
14810
+ var GetLoginDevices = async ({
14811
+ username,
14812
+ pageParam,
14813
+ pageSize,
14814
+ orderBy,
14815
+ search,
14816
+ adminApiParams
14817
+ }) => {
14818
+ const adminApi = await GetAdminAPI(adminApiParams);
14819
+ const { data } = await adminApi.get(`/logins/${username}/devices`, {
14820
+ params: {
14821
+ page: pageParam || void 0,
14822
+ pageSize: pageSize || void 0,
14823
+ orderBy: orderBy || void 0,
14824
+ search: search || void 0
14825
+ }
14826
+ });
14827
+ return data;
14828
+ };
14829
+ var useGetLoginDevices = (username = "", params = {}, options = {}) => {
14830
+ return useConnectedInfiniteQuery(
14831
+ LOGIN_DEVICES_QUERY_KEY(username),
14832
+ (queryParams) => GetLoginDevices({ username, ...queryParams }),
14833
+ params,
14834
+ {
14835
+ ...options,
14836
+ enabled: !!username && (options.enabled ?? true)
14837
+ },
14838
+ "accounts"
14839
+ );
14840
+ };
14841
+
14876
14842
  // src/queries/memberships/useGetMemberships.ts
14877
14843
  var MEMBERSHIPS_QUERY_KEY = () => ["MEMBERSHIPS"];
14878
14844
  var SET_MEMBERSHIPS_QUERY_DATA = (client, keyParams, response) => {
@@ -16213,6 +16179,79 @@ var useSearchOrganization = (search, filters, options = {}) => {
16213
16179
  );
16214
16180
  };
16215
16181
 
16182
+ // src/queries/push-devices/useGetPushDevices.ts
16183
+ var PUSH_DEVICES_QUERY_KEY = (accountId) => {
16184
+ const key = ["PUSH_DEVICES"];
16185
+ if (accountId) key.push(accountId);
16186
+ return key;
16187
+ };
16188
+ var SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA = (client, keyParams, response) => {
16189
+ client.setQueryData(PUSH_DEVICES_QUERY_KEY(...keyParams), response);
16190
+ };
16191
+ var GetPushDevices = async ({
16192
+ accountId,
16193
+ pageParam,
16194
+ pageSize,
16195
+ orderBy,
16196
+ search,
16197
+ adminApiParams
16198
+ }) => {
16199
+ const adminApi = await GetAdminAPI(adminApiParams);
16200
+ const { data } = await adminApi.get(`/push-devices`, {
16201
+ params: {
16202
+ page: pageParam || void 0,
16203
+ pageSize: pageSize || void 0,
16204
+ orderBy: orderBy || void 0,
16205
+ search: search || void 0,
16206
+ accountId: accountId || void 0
16207
+ }
16208
+ });
16209
+ return data;
16210
+ };
16211
+ var useGetPushDevices = (accountId = "", params = {}, options = {}) => {
16212
+ return useConnectedInfiniteQuery(
16213
+ PUSH_DEVICES_QUERY_KEY(accountId),
16214
+ (params2) => GetPushDevices({
16215
+ ...params2,
16216
+ accountId
16217
+ }),
16218
+ params,
16219
+ {
16220
+ ...options,
16221
+ enabled: options?.enabled ?? true
16222
+ },
16223
+ "accounts"
16224
+ );
16225
+ };
16226
+
16227
+ // src/queries/push-devices/useGetPushDevice.ts
16228
+ var PUSH_DEVICE_QUERY_KEY = (pushDeviceId) => [
16229
+ ...PUSH_DEVICES_QUERY_KEY(),
16230
+ pushDeviceId
16231
+ ];
16232
+ var SET_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response) => {
16233
+ client.setQueryData(PUSH_DEVICE_QUERY_KEY(...keyParams), response);
16234
+ };
16235
+ var GetPushDevice = async ({
16236
+ pushDeviceId = "",
16237
+ adminApiParams
16238
+ }) => {
16239
+ const adminApi = await GetAdminAPI(adminApiParams);
16240
+ const { data } = await adminApi.get(`/push-devices/${pushDeviceId}`);
16241
+ return data;
16242
+ };
16243
+ var useGetPushDevice = (pushDeviceId = "", options = {}) => {
16244
+ return useConnectedSingleQuery(
16245
+ PUSH_DEVICE_QUERY_KEY(pushDeviceId),
16246
+ (params) => GetPushDevice({ pushDeviceId, ...params }),
16247
+ {
16248
+ ...options,
16249
+ enabled: !!pushDeviceId && (options?.enabled ?? true)
16250
+ },
16251
+ "accounts"
16252
+ );
16253
+ };
16254
+
16216
16255
  // src/queries/reports/useGetCustomReports.ts
16217
16256
  var CUSTOM_REPORTS_QUERY_KEY = (filters = {}) => [
16218
16257
  "CUSTOM_REPORTS",
@@ -19653,34 +19692,6 @@ var useDeleteAccountLead = (options = {}) => {
19653
19692
  });
19654
19693
  };
19655
19694
 
19656
- // src/mutations/account/useDeleteAccountPushDevice.ts
19657
- var DeleteAccountPushDevice = async ({
19658
- accountId,
19659
- pushDeviceId,
19660
- adminApiParams,
19661
- queryClient
19662
- }) => {
19663
- const connectedXM = await GetAdminAPI(adminApiParams);
19664
- const { data } = await connectedXM.delete(
19665
- `/accounts/${accountId}/push-devices/${pushDeviceId}`
19666
- );
19667
- if (queryClient && data.status === "ok") {
19668
- queryClient.invalidateQueries({
19669
- queryKey: ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId)
19670
- });
19671
- queryClient.invalidateQueries({
19672
- queryKey: ACCOUNT_PUSH_DEVICE_QUERY_KEY(accountId, pushDeviceId)
19673
- });
19674
- }
19675
- return data;
19676
- };
19677
- var useDeleteAccountPushDevice = (options = {}) => {
19678
- return useConnectedMutation(DeleteAccountPushDevice, options, {
19679
- domain: "accounts",
19680
- type: "update"
19681
- });
19682
- };
19683
-
19684
19695
  // src/mutations/account/useExportAccount.ts
19685
19696
  var ExportAccount = async ({
19686
19697
  accountId,
@@ -34106,6 +34117,33 @@ var useUpdatePayment = (options = {}) => {
34106
34117
  });
34107
34118
  };
34108
34119
 
34120
+ // src/mutations/push-devices/useDeletePushDevice.ts
34121
+ var DeletePushDevice = async ({
34122
+ pushDeviceId,
34123
+ adminApiParams,
34124
+ queryClient
34125
+ }) => {
34126
+ const connectedXM = await GetAdminAPI(adminApiParams);
34127
+ const { data } = await connectedXM.delete(
34128
+ `/push-devices/${pushDeviceId}`
34129
+ );
34130
+ if (queryClient && data.status === "ok") {
34131
+ queryClient.invalidateQueries({
34132
+ queryKey: PUSH_DEVICES_QUERY_KEY()
34133
+ });
34134
+ queryClient.removeQueries({
34135
+ queryKey: PUSH_DEVICE_QUERY_KEY(pushDeviceId)
34136
+ });
34137
+ }
34138
+ return data;
34139
+ };
34140
+ var useDeletePushDevice = (options = {}) => {
34141
+ return useConnectedMutation(DeletePushDevice, options, {
34142
+ domain: "accounts",
34143
+ type: "update"
34144
+ });
34145
+ };
34146
+
34109
34147
  // src/mutations/reports/useAddCustomReportUser.ts
34110
34148
  var AddCustomReportUser = async ({
34111
34149
  reportId,
@@ -37013,8 +37051,6 @@ export {
37013
37051
  ACCOUNT_LIKES_QUERY_KEY,
37014
37052
  ACCOUNT_NOTIFICATION_PREFERENCES_QUERY_KEY,
37015
37053
  ACCOUNT_PAYMENTS_QUERY_KEY,
37016
- ACCOUNT_PUSH_DEVICES_QUERY_KEY,
37017
- ACCOUNT_PUSH_DEVICE_QUERY_KEY,
37018
37054
  ACCOUNT_QUERY_KEY,
37019
37055
  ACCOUNT_SUBSCRIPTIONS_QUERY_KEY,
37020
37056
  ACCOUNT_THREADS_QUERY_KEY,
@@ -37308,7 +37344,6 @@ export {
37308
37344
  DeleteAccountAddress,
37309
37345
  DeleteAccountInvitation,
37310
37346
  DeleteAccountLead,
37311
- DeleteAccountPushDevice,
37312
37347
  DeleteActivity,
37313
37348
  DeleteAdvertisement,
37314
37349
  DeleteAnnouncement,
@@ -37421,6 +37456,7 @@ export {
37421
37456
  DeleteOrganizationTeamMember,
37422
37457
  DeleteOrganizationUser,
37423
37458
  DeleteOrganizationWebhook,
37459
+ DeletePushDevice,
37424
37460
  DeleteSelfApiKey,
37425
37461
  DeleteSeries,
37426
37462
  DeleteStreamInput,
@@ -37710,8 +37746,6 @@ export {
37710
37746
  GetAccountLikes,
37711
37747
  GetAccountNotificationPreferences,
37712
37748
  GetAccountPayments,
37713
- GetAccountPushDevice,
37714
- GetAccountPushDevices,
37715
37749
  GetAccountSubscriptions,
37716
37750
  GetAccountThreads,
37717
37751
  GetAccountTiers,
@@ -38039,6 +38073,7 @@ export {
38039
38073
  GetLinkPreview,
38040
38074
  GetLogin,
38041
38075
  GetLoginAccounts,
38076
+ GetLoginDevices,
38042
38077
  GetLogins,
38043
38078
  GetMembership,
38044
38079
  GetMembershipPrice,
@@ -38067,6 +38102,8 @@ export {
38067
38102
  GetOrganizationWebhooks,
38068
38103
  GetPayment,
38069
38104
  GetPayments,
38105
+ GetPushDevice,
38106
+ GetPushDevices,
38070
38107
  GetReport,
38071
38108
  GetReports,
38072
38109
  GetSelf,
@@ -38182,6 +38219,7 @@ export {
38182
38219
  LINK_PREVIEW_QUERY_KEY,
38183
38220
  LOGINS_QUERY_KEY,
38184
38221
  LOGIN_ACCOUNTS_QUERY_KEY,
38222
+ LOGIN_DEVICES_QUERY_KEY,
38185
38223
  LOGIN_QUERY_KEY,
38186
38224
  LeadStatus,
38187
38225
  MEMBERSHIPS_QUERY_KEY,
@@ -38220,6 +38258,8 @@ export {
38220
38258
  OrganizationTriggerType,
38221
38259
  PAYMENTS_QUERY_KEY,
38222
38260
  PAYMENT_QUERY_KEY,
38261
+ PUSH_DEVICES_QUERY_KEY,
38262
+ PUSH_DEVICE_QUERY_KEY,
38223
38263
  PageType,
38224
38264
  PassTypeAccessLevel,
38225
38265
  PassTypeVisibility,
@@ -38333,7 +38373,6 @@ export {
38333
38373
  SET_ACCOUNT_NOTIFICATION_PREFERENCES_QUERY_DATA,
38334
38374
  SET_ACCOUNT_PAYMENTS_QUERY_DATA,
38335
38375
  SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
38336
- SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA,
38337
38376
  SET_ACCOUNT_QUERY_DATA,
38338
38377
  SET_ACCOUNT_SUBSCRIPTIONS_QUERY_DATA,
38339
38378
  SET_ACCOUNT_THREADS_QUERY_DATA,
@@ -38681,6 +38720,7 @@ export {
38681
38720
  SET_PASS_TYPE_COUPONS_QUERY_DATA,
38682
38721
  SET_PAYMENTS_QUERY_DATA,
38683
38722
  SET_PAYMENT_QUERY_DATA,
38723
+ SET_PUSH_DEVICE_QUERY_DATA,
38684
38724
  SET_REPORTS_QUERY_DATA,
38685
38725
  SET_REPORT_QUERY_DATA,
38686
38726
  SET_SEARCH_ORGANIZATION_QUERY_DATA,
@@ -39220,7 +39260,6 @@ export {
39220
39260
  useDeleteAccountAddress,
39221
39261
  useDeleteAccountInvitation,
39222
39262
  useDeleteAccountLead,
39223
- useDeleteAccountPushDevice,
39224
39263
  useDeleteActivity,
39225
39264
  useDeleteAdvertisement,
39226
39265
  useDeleteAnnouncement,
@@ -39333,6 +39372,7 @@ export {
39333
39372
  useDeleteOrganizationTeamMember,
39334
39373
  useDeleteOrganizationUser,
39335
39374
  useDeleteOrganizationWebhook,
39375
+ useDeletePushDevice,
39336
39376
  useDeleteSelfApiKey,
39337
39377
  useDeleteSeries,
39338
39378
  useDeleteStreamInput,
@@ -39388,8 +39428,6 @@ export {
39388
39428
  useGetAccountLikes,
39389
39429
  useGetAccountNotificationPreferences,
39390
39430
  useGetAccountPayments,
39391
- useGetAccountPushDevice,
39392
- useGetAccountPushDevices,
39393
39431
  useGetAccountSubscriptions,
39394
39432
  useGetAccountThreads,
39395
39433
  useGetAccountTiers,
@@ -39713,6 +39751,7 @@ export {
39713
39751
  useGetLinkPreview,
39714
39752
  useGetLogin,
39715
39753
  useGetLoginAccounts,
39754
+ useGetLoginDevices,
39716
39755
  useGetLogins,
39717
39756
  useGetMembership,
39718
39757
  useGetMembershipPrice,
@@ -39741,6 +39780,8 @@ export {
39741
39780
  useGetOrganizationWebhooks,
39742
39781
  useGetPayment,
39743
39782
  useGetPayments,
39783
+ useGetPushDevice,
39784
+ useGetPushDevices,
39744
39785
  useGetReport,
39745
39786
  useGetReports,
39746
39787
  useGetSelf,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "3.2.2",
3
+ "version": "3.2.4",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",