@connectedxm/admin 1.4.26 → 1.4.28

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
@@ -51,6 +51,8 @@ __export(src_exports, {
51
51
  ACCOUNT_LOGINS_QUERY_KEY: () => ACCOUNT_LOGINS_QUERY_KEY,
52
52
  ACCOUNT_LOGIN_QUERY_KEY: () => ACCOUNT_LOGIN_QUERY_KEY,
53
53
  ACCOUNT_PAYMENTS_QUERY_KEY: () => ACCOUNT_PAYMENTS_QUERY_KEY,
54
+ ACCOUNT_PUSH_DEVICES_QUERY_KEY: () => ACCOUNT_PUSH_DEVICES_QUERY_KEY,
55
+ ACCOUNT_PUSH_DEVICE_QUERY_KEY: () => ACCOUNT_PUSH_DEVICE_QUERY_KEY,
54
56
  ACCOUNT_QUERY_KEY: () => ACCOUNT_QUERY_KEY,
55
57
  ACCOUNT_RESHARES_QUERY_KEY: () => ACCOUNT_RESHARES_QUERY_KEY,
56
58
  ACCOUNT_SUBSCRIPTIONS_QUERY_KEY: () => ACCOUNT_SUBSCRIPTIONS_QUERY_KEY,
@@ -282,6 +284,7 @@ __export(src_exports, {
282
284
  DeleteAccount: () => DeleteAccount,
283
285
  DeleteAccountAddress: () => DeleteAccountAddress,
284
286
  DeleteAccountLead: () => DeleteAccountLead,
287
+ DeleteAccountPushDevice: () => DeleteAccountPushDevice,
285
288
  DeleteActivity: () => DeleteActivity,
286
289
  DeleteAdvertisement: () => DeleteAdvertisement,
287
290
  DeleteAnnouncement: () => DeleteAnnouncement,
@@ -561,6 +564,8 @@ __export(src_exports, {
561
564
  GetAccountLogin: () => GetAccountLogin,
562
565
  GetAccountLogins: () => GetAccountLogins,
563
566
  GetAccountPayments: () => GetAccountPayments,
567
+ GetAccountPushDevice: () => GetAccountPushDevice,
568
+ GetAccountPushDevices: () => GetAccountPushDevices,
564
569
  GetAccountReshares: () => GetAccountReshares,
565
570
  GetAccountSubscriptions: () => GetAccountSubscriptions,
566
571
  GetAccountTiers: () => GetAccountTiers,
@@ -1034,6 +1039,8 @@ __export(src_exports, {
1034
1039
  SET_ACCOUNT_LEVELS_QUERY_DATA: () => SET_ACCOUNT_LEVELS_QUERY_DATA,
1035
1040
  SET_ACCOUNT_LIKES_QUERY_DATA: () => SET_ACCOUNT_LIKES_QUERY_DATA,
1036
1041
  SET_ACCOUNT_PAYMENTS_QUERY_DATA: () => SET_ACCOUNT_PAYMENTS_QUERY_DATA,
1042
+ SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA: () => SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
1043
+ SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA: () => SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA,
1037
1044
  SET_ACCOUNT_QUERY_DATA: () => SET_ACCOUNT_QUERY_DATA,
1038
1045
  SET_ACCOUNT_RESHARES_QUERY_DATA: () => SET_ACCOUNT_RESHARES_QUERY_DATA,
1039
1046
  SET_ACCOUNT_SUBSCRIPTIONS_QUERY_DATA: () => SET_ACCOUNT_SUBSCRIPTIONS_QUERY_DATA,
@@ -1663,6 +1670,7 @@ __export(src_exports, {
1663
1670
  useDeleteAccount: () => useDeleteAccount,
1664
1671
  useDeleteAccountAddress: () => useDeleteAccountAddress,
1665
1672
  useDeleteAccountLead: () => useDeleteAccountLead,
1673
+ useDeleteAccountPushDevice: () => useDeleteAccountPushDevice,
1666
1674
  useDeleteActivity: () => useDeleteActivity,
1667
1675
  useDeleteAdvertisement: () => useDeleteAdvertisement,
1668
1676
  useDeleteAnnouncement: () => useDeleteAnnouncement,
@@ -1783,6 +1791,8 @@ __export(src_exports, {
1783
1791
  useGetAccountLogin: () => useGetAccountLogin,
1784
1792
  useGetAccountLogins: () => useGetAccountLogins,
1785
1793
  useGetAccountPayments: () => useGetAccountPayments,
1794
+ useGetAccountPushDevice: () => useGetAccountPushDevice,
1795
+ useGetAccountPushDevices: () => useGetAccountPushDevices,
1786
1796
  useGetAccountReshares: () => useGetAccountReshares,
1787
1797
  useGetAccountSubscriptions: () => useGetAccountSubscriptions,
1788
1798
  useGetAccountTiers: () => useGetAccountTiers,
@@ -3316,6 +3326,77 @@ var useGetAccountPayments = (accountId = "", params = {}, options = {}) => {
3316
3326
  );
3317
3327
  };
3318
3328
 
3329
+ // src/queries/accounts/useGetAccountPushDevices.ts
3330
+ var ACCOUNT_PUSH_DEVICES_QUERY_KEY = (accountId) => {
3331
+ const key = [...ACCOUNT_QUERY_KEY(accountId), "PUSH_DEVICES"];
3332
+ return key;
3333
+ };
3334
+ var SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA = (client, keyParams, response) => {
3335
+ client.setQueryData(ACCOUNT_PUSH_DEVICES_QUERY_KEY(...keyParams), response);
3336
+ };
3337
+ var GetAccountPushDevices = async ({
3338
+ accountId,
3339
+ pageParam,
3340
+ pageSize,
3341
+ orderBy,
3342
+ search,
3343
+ adminApiParams
3344
+ }) => {
3345
+ const adminApi = await GetAdminAPI(adminApiParams);
3346
+ const { data } = await adminApi.get(`/accounts/${accountId}/push-devices`, {
3347
+ params: {
3348
+ page: pageParam || void 0,
3349
+ pageSize: pageSize || void 0,
3350
+ orderBy: orderBy || void 0,
3351
+ search: search || void 0
3352
+ }
3353
+ });
3354
+ return data;
3355
+ };
3356
+ var useGetAccountPushDevices = (accountId = "", params = {}, options = {}) => {
3357
+ return useConnectedInfiniteQuery(
3358
+ ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId),
3359
+ (params2) => GetAccountPushDevices({
3360
+ ...params2,
3361
+ accountId
3362
+ }),
3363
+ params,
3364
+ {
3365
+ ...options,
3366
+ enabled: !!accountId && (options?.enabled ?? true)
3367
+ },
3368
+ "accounts"
3369
+ );
3370
+ };
3371
+
3372
+ // src/queries/accounts/useGetAccountPushDevice.ts
3373
+ var ACCOUNT_PUSH_DEVICE_QUERY_KEY = (accountId, pushDeviceId) => [...ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId), pushDeviceId];
3374
+ var SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response) => {
3375
+ client.setQueryData(ACCOUNT_PUSH_DEVICE_QUERY_KEY(...keyParams), response);
3376
+ };
3377
+ var GetAccountPushDevice = async ({
3378
+ accountId = "",
3379
+ pushDeviceId = "",
3380
+ adminApiParams
3381
+ }) => {
3382
+ const adminApi = await GetAdminAPI(adminApiParams);
3383
+ const { data } = await adminApi.get(
3384
+ `/accounts/${accountId}/push-devices/${pushDeviceId}`
3385
+ );
3386
+ return data;
3387
+ };
3388
+ var useGetAccountPushDevice = (accountId = "", pushDeviceId = "", options = {}) => {
3389
+ return useConnectedSingleQuery(
3390
+ ACCOUNT_PUSH_DEVICE_QUERY_KEY(accountId, pushDeviceId),
3391
+ (params) => GetAccountPushDevice({ accountId, pushDeviceId, ...params }),
3392
+ {
3393
+ ...options,
3394
+ enabled: !!accountId && !!pushDeviceId && (options?.enabled ?? true)
3395
+ },
3396
+ "accounts"
3397
+ );
3398
+ };
3399
+
3319
3400
  // src/queries/accounts/useGetAccountReshares.ts
3320
3401
  var ACCOUNT_RESHARES_QUERY_KEY = (accountId) => [
3321
3402
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -16511,6 +16592,34 @@ var useDeleteAccountLead = (options = {}) => {
16511
16592
  });
16512
16593
  };
16513
16594
 
16595
+ // src/mutations/account/useDeleteAccountPushDevice.ts
16596
+ var DeleteAccountPushDevice = async ({
16597
+ accountId,
16598
+ pushDeviceId,
16599
+ adminApiParams,
16600
+ queryClient
16601
+ }) => {
16602
+ const connectedXM = await GetAdminAPI(adminApiParams);
16603
+ const { data } = await connectedXM.delete(
16604
+ `/accounts/${accountId}/push-devices/${pushDeviceId}`
16605
+ );
16606
+ if (queryClient && data.status === "ok") {
16607
+ queryClient.invalidateQueries({
16608
+ queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
16609
+ });
16610
+ queryClient.invalidateQueries({
16611
+ queryKey: ACCOUNT_LEAD_QUERY_KEY(accountId, pushDeviceId)
16612
+ });
16613
+ }
16614
+ return data;
16615
+ };
16616
+ var useDeleteAccountPushDevice = (options = {}) => {
16617
+ return useConnectedMutation(DeleteAccountPushDevice, options, {
16618
+ domain: "accounts",
16619
+ type: "update"
16620
+ });
16621
+ };
16622
+
16514
16623
  // src/mutations/account/useExportAccount.ts
16515
16624
  var ExportAccount = async ({
16516
16625
  accountId,
@@ -28427,6 +28536,8 @@ var useUpdateVideo = (options = {}) => {
28427
28536
  ACCOUNT_LOGINS_QUERY_KEY,
28428
28537
  ACCOUNT_LOGIN_QUERY_KEY,
28429
28538
  ACCOUNT_PAYMENTS_QUERY_KEY,
28539
+ ACCOUNT_PUSH_DEVICES_QUERY_KEY,
28540
+ ACCOUNT_PUSH_DEVICE_QUERY_KEY,
28430
28541
  ACCOUNT_QUERY_KEY,
28431
28542
  ACCOUNT_RESHARES_QUERY_KEY,
28432
28543
  ACCOUNT_SUBSCRIPTIONS_QUERY_KEY,
@@ -28658,6 +28769,7 @@ var useUpdateVideo = (options = {}) => {
28658
28769
  DeleteAccount,
28659
28770
  DeleteAccountAddress,
28660
28771
  DeleteAccountLead,
28772
+ DeleteAccountPushDevice,
28661
28773
  DeleteActivity,
28662
28774
  DeleteAdvertisement,
28663
28775
  DeleteAnnouncement,
@@ -28937,6 +29049,8 @@ var useUpdateVideo = (options = {}) => {
28937
29049
  GetAccountLogin,
28938
29050
  GetAccountLogins,
28939
29051
  GetAccountPayments,
29052
+ GetAccountPushDevice,
29053
+ GetAccountPushDevices,
28940
29054
  GetAccountReshares,
28941
29055
  GetAccountSubscriptions,
28942
29056
  GetAccountTiers,
@@ -29410,6 +29524,8 @@ var useUpdateVideo = (options = {}) => {
29410
29524
  SET_ACCOUNT_LEVELS_QUERY_DATA,
29411
29525
  SET_ACCOUNT_LIKES_QUERY_DATA,
29412
29526
  SET_ACCOUNT_PAYMENTS_QUERY_DATA,
29527
+ SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
29528
+ SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA,
29413
29529
  SET_ACCOUNT_QUERY_DATA,
29414
29530
  SET_ACCOUNT_RESHARES_QUERY_DATA,
29415
29531
  SET_ACCOUNT_SUBSCRIPTIONS_QUERY_DATA,
@@ -30039,6 +30155,7 @@ var useUpdateVideo = (options = {}) => {
30039
30155
  useDeleteAccount,
30040
30156
  useDeleteAccountAddress,
30041
30157
  useDeleteAccountLead,
30158
+ useDeleteAccountPushDevice,
30042
30159
  useDeleteActivity,
30043
30160
  useDeleteAdvertisement,
30044
30161
  useDeleteAnnouncement,
@@ -30159,6 +30276,8 @@ var useUpdateVideo = (options = {}) => {
30159
30276
  useGetAccountLogin,
30160
30277
  useGetAccountLogins,
30161
30278
  useGetAccountPayments,
30279
+ useGetAccountPushDevice,
30280
+ useGetAccountPushDevices,
30162
30281
  useGetAccountReshares,
30163
30282
  useGetAccountSubscriptions,
30164
30283
  useGetAccountTiers,
package/dist/index.mjs CHANGED
@@ -1045,6 +1045,77 @@ var useGetAccountPayments = (accountId = "", params = {}, options = {}) => {
1045
1045
  );
1046
1046
  };
1047
1047
 
1048
+ // src/queries/accounts/useGetAccountPushDevices.ts
1049
+ var ACCOUNT_PUSH_DEVICES_QUERY_KEY = (accountId) => {
1050
+ const key = [...ACCOUNT_QUERY_KEY(accountId), "PUSH_DEVICES"];
1051
+ return key;
1052
+ };
1053
+ var SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA = (client, keyParams, response) => {
1054
+ client.setQueryData(ACCOUNT_PUSH_DEVICES_QUERY_KEY(...keyParams), response);
1055
+ };
1056
+ var GetAccountPushDevices = async ({
1057
+ accountId,
1058
+ pageParam,
1059
+ pageSize,
1060
+ orderBy,
1061
+ search,
1062
+ adminApiParams
1063
+ }) => {
1064
+ const adminApi = await GetAdminAPI(adminApiParams);
1065
+ const { data } = await adminApi.get(`/accounts/${accountId}/push-devices`, {
1066
+ params: {
1067
+ page: pageParam || void 0,
1068
+ pageSize: pageSize || void 0,
1069
+ orderBy: orderBy || void 0,
1070
+ search: search || void 0
1071
+ }
1072
+ });
1073
+ return data;
1074
+ };
1075
+ var useGetAccountPushDevices = (accountId = "", params = {}, options = {}) => {
1076
+ return useConnectedInfiniteQuery(
1077
+ ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId),
1078
+ (params2) => GetAccountPushDevices({
1079
+ ...params2,
1080
+ accountId
1081
+ }),
1082
+ params,
1083
+ {
1084
+ ...options,
1085
+ enabled: !!accountId && (options?.enabled ?? true)
1086
+ },
1087
+ "accounts"
1088
+ );
1089
+ };
1090
+
1091
+ // src/queries/accounts/useGetAccountPushDevice.ts
1092
+ var ACCOUNT_PUSH_DEVICE_QUERY_KEY = (accountId, pushDeviceId) => [...ACCOUNT_PUSH_DEVICES_QUERY_KEY(accountId), pushDeviceId];
1093
+ var SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA = (client, keyParams, response) => {
1094
+ client.setQueryData(ACCOUNT_PUSH_DEVICE_QUERY_KEY(...keyParams), response);
1095
+ };
1096
+ var GetAccountPushDevice = async ({
1097
+ accountId = "",
1098
+ pushDeviceId = "",
1099
+ adminApiParams
1100
+ }) => {
1101
+ const adminApi = await GetAdminAPI(adminApiParams);
1102
+ const { data } = await adminApi.get(
1103
+ `/accounts/${accountId}/push-devices/${pushDeviceId}`
1104
+ );
1105
+ return data;
1106
+ };
1107
+ var useGetAccountPushDevice = (accountId = "", pushDeviceId = "", options = {}) => {
1108
+ return useConnectedSingleQuery(
1109
+ ACCOUNT_PUSH_DEVICE_QUERY_KEY(accountId, pushDeviceId),
1110
+ (params) => GetAccountPushDevice({ accountId, pushDeviceId, ...params }),
1111
+ {
1112
+ ...options,
1113
+ enabled: !!accountId && !!pushDeviceId && (options?.enabled ?? true)
1114
+ },
1115
+ "accounts"
1116
+ );
1117
+ };
1118
+
1048
1119
  // src/queries/accounts/useGetAccountReshares.ts
1049
1120
  var ACCOUNT_RESHARES_QUERY_KEY = (accountId) => [
1050
1121
  ...ACCOUNT_QUERY_KEY(accountId),
@@ -14243,6 +14314,34 @@ var useDeleteAccountLead = (options = {}) => {
14243
14314
  });
14244
14315
  };
14245
14316
 
14317
+ // src/mutations/account/useDeleteAccountPushDevice.ts
14318
+ var DeleteAccountPushDevice = async ({
14319
+ accountId,
14320
+ pushDeviceId,
14321
+ adminApiParams,
14322
+ queryClient
14323
+ }) => {
14324
+ const connectedXM = await GetAdminAPI(adminApiParams);
14325
+ const { data } = await connectedXM.delete(
14326
+ `/accounts/${accountId}/push-devices/${pushDeviceId}`
14327
+ );
14328
+ if (queryClient && data.status === "ok") {
14329
+ queryClient.invalidateQueries({
14330
+ queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
14331
+ });
14332
+ queryClient.invalidateQueries({
14333
+ queryKey: ACCOUNT_LEAD_QUERY_KEY(accountId, pushDeviceId)
14334
+ });
14335
+ }
14336
+ return data;
14337
+ };
14338
+ var useDeleteAccountPushDevice = (options = {}) => {
14339
+ return useConnectedMutation(DeleteAccountPushDevice, options, {
14340
+ domain: "accounts",
14341
+ type: "update"
14342
+ });
14343
+ };
14344
+
14246
14345
  // src/mutations/account/useExportAccount.ts
14247
14346
  var ExportAccount = async ({
14248
14347
  accountId,
@@ -26158,6 +26257,8 @@ export {
26158
26257
  ACCOUNT_LOGINS_QUERY_KEY,
26159
26258
  ACCOUNT_LOGIN_QUERY_KEY,
26160
26259
  ACCOUNT_PAYMENTS_QUERY_KEY,
26260
+ ACCOUNT_PUSH_DEVICES_QUERY_KEY,
26261
+ ACCOUNT_PUSH_DEVICE_QUERY_KEY,
26161
26262
  ACCOUNT_QUERY_KEY,
26162
26263
  ACCOUNT_RESHARES_QUERY_KEY,
26163
26264
  ACCOUNT_SUBSCRIPTIONS_QUERY_KEY,
@@ -26389,6 +26490,7 @@ export {
26389
26490
  DeleteAccount,
26390
26491
  DeleteAccountAddress,
26391
26492
  DeleteAccountLead,
26493
+ DeleteAccountPushDevice,
26392
26494
  DeleteActivity,
26393
26495
  DeleteAdvertisement,
26394
26496
  DeleteAnnouncement,
@@ -26668,6 +26770,8 @@ export {
26668
26770
  GetAccountLogin,
26669
26771
  GetAccountLogins,
26670
26772
  GetAccountPayments,
26773
+ GetAccountPushDevice,
26774
+ GetAccountPushDevices,
26671
26775
  GetAccountReshares,
26672
26776
  GetAccountSubscriptions,
26673
26777
  GetAccountTiers,
@@ -27141,6 +27245,8 @@ export {
27141
27245
  SET_ACCOUNT_LEVELS_QUERY_DATA,
27142
27246
  SET_ACCOUNT_LIKES_QUERY_DATA,
27143
27247
  SET_ACCOUNT_PAYMENTS_QUERY_DATA,
27248
+ SET_ACCOUNT_PUSH_DEVICES_QUERY_DATA,
27249
+ SET_ACCOUNT_PUSH_DEVICE_QUERY_DATA,
27144
27250
  SET_ACCOUNT_QUERY_DATA,
27145
27251
  SET_ACCOUNT_RESHARES_QUERY_DATA,
27146
27252
  SET_ACCOUNT_SUBSCRIPTIONS_QUERY_DATA,
@@ -27770,6 +27876,7 @@ export {
27770
27876
  useDeleteAccount,
27771
27877
  useDeleteAccountAddress,
27772
27878
  useDeleteAccountLead,
27879
+ useDeleteAccountPushDevice,
27773
27880
  useDeleteActivity,
27774
27881
  useDeleteAdvertisement,
27775
27882
  useDeleteAnnouncement,
@@ -27890,6 +27997,8 @@ export {
27890
27997
  useGetAccountLogin,
27891
27998
  useGetAccountLogins,
27892
27999
  useGetAccountPayments,
28000
+ useGetAccountPushDevice,
28001
+ useGetAccountPushDevices,
27893
28002
  useGetAccountReshares,
27894
28003
  useGetAccountSubscriptions,
27895
28004
  useGetAccountTiers,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "1.4.26",
3
+ "version": "1.4.28",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {