@connectedxm/admin 1.5.3 → 1.5.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
@@ -44,6 +44,7 @@ __export(src_exports, {
44
44
  ACCOUNT_FOLLOWING_QUERY_KEY: () => ACCOUNT_FOLLOWING_QUERY_KEY,
45
45
  ACCOUNT_GROUPS_QUERY_KEY: () => ACCOUNT_GROUPS_QUERY_KEY,
46
46
  ACCOUNT_INTERESTS_QUERY_KEY: () => ACCOUNT_INTERESTS_QUERY_KEY,
47
+ ACCOUNT_INVITATIONS_QUERY_KEY: () => ACCOUNT_INVITATIONS_QUERY_KEY,
47
48
  ACCOUNT_LEADS_QUERY_KEY: () => ACCOUNT_LEADS_QUERY_KEY,
48
49
  ACCOUNT_LEAD_QUERY_KEY: () => ACCOUNT_LEAD_QUERY_KEY,
49
50
  ACCOUNT_LEVELS_QUERY_KEY: () => ACCOUNT_LEVELS_QUERY_KEY,
@@ -190,6 +191,7 @@ __export(src_exports, {
190
191
  ContentStatus: () => ContentStatus,
191
192
  CreateAccount: () => CreateAccount,
192
193
  CreateAccountAddress: () => CreateAccountAddress,
194
+ CreateAccountInvitations: () => CreateAccountInvitations,
193
195
  CreateActivity: () => CreateActivity,
194
196
  CreateAdvertisement: () => CreateAdvertisement,
195
197
  CreateAnnouncement: () => CreateAnnouncement,
@@ -283,6 +285,7 @@ __export(src_exports, {
283
285
  DelegateRole: () => DelegateRole,
284
286
  DeleteAccount: () => DeleteAccount,
285
287
  DeleteAccountAddress: () => DeleteAccountAddress,
288
+ DeleteAccountInvitation: () => DeleteAccountInvitation,
286
289
  DeleteAccountLead: () => DeleteAccountLead,
287
290
  DeleteAccountPushDevice: () => DeleteAccountPushDevice,
288
291
  DeleteActivity: () => DeleteActivity,
@@ -557,6 +560,7 @@ __export(src_exports, {
557
560
  GetAccountFollowing: () => GetAccountFollowing,
558
561
  GetAccountGroups: () => GetAccountGroups,
559
562
  GetAccountInterests: () => GetAccountInterests,
563
+ GetAccountInvitations: () => GetAccountInvitations,
560
564
  GetAccountLead: () => GetAccountLead,
561
565
  GetAccountLeads: () => GetAccountLeads,
562
566
  GetAccountLevels: () => GetAccountLevels,
@@ -1034,6 +1038,7 @@ __export(src_exports, {
1034
1038
  SET_ACCOUNT_FOLLOWING_QUERY_DATA: () => SET_ACCOUNT_FOLLOWING_QUERY_DATA,
1035
1039
  SET_ACCOUNT_GROUPS_QUERY_DATA: () => SET_ACCOUNT_GROUPS_QUERY_DATA,
1036
1040
  SET_ACCOUNT_INTERESTS_QUERY_DATA: () => SET_ACCOUNT_INTERESTS_QUERY_DATA,
1041
+ SET_ACCOUNT_INVITATIONS_QUERY_DATA: () => SET_ACCOUNT_INVITATIONS_QUERY_DATA,
1037
1042
  SET_ACCOUNT_LEADS_QUERY_DATA: () => SET_ACCOUNT_LEADS_QUERY_DATA,
1038
1043
  SET_ACCOUNT_LEAD_QUERY_DATA: () => SET_ACCOUNT_LEAD_QUERY_DATA,
1039
1044
  SET_ACCOUNT_LEVELS_QUERY_DATA: () => SET_ACCOUNT_LEVELS_QUERY_DATA,
@@ -1580,6 +1585,7 @@ __export(src_exports, {
1580
1585
  useConnectedXM: () => useConnectedXM,
1581
1586
  useCreateAccount: () => useCreateAccount,
1582
1587
  useCreateAccountAddress: () => useCreateAccountAddress,
1588
+ useCreateAccountInvitations: () => useCreateAccountInvitations,
1583
1589
  useCreateActivity: () => useCreateActivity,
1584
1590
  useCreateAdvertisement: () => useCreateAdvertisement,
1585
1591
  useCreateAnnouncement: () => useCreateAnnouncement,
@@ -1669,6 +1675,7 @@ __export(src_exports, {
1669
1675
  useCreateTier: () => useCreateTier,
1670
1676
  useDeleteAccount: () => useDeleteAccount,
1671
1677
  useDeleteAccountAddress: () => useDeleteAccountAddress,
1678
+ useDeleteAccountInvitation: () => useDeleteAccountInvitation,
1672
1679
  useDeleteAccountLead: () => useDeleteAccountLead,
1673
1680
  useDeleteAccountPushDevice: () => useDeleteAccountPushDevice,
1674
1681
  useDeleteActivity: () => useDeleteActivity,
@@ -1784,6 +1791,7 @@ __export(src_exports, {
1784
1791
  useGetAccountFollowing: () => useGetAccountFollowing,
1785
1792
  useGetAccountGroups: () => useGetAccountGroups,
1786
1793
  useGetAccountInterests: () => useGetAccountInterests,
1794
+ useGetAccountInvitations: () => useGetAccountInvitations,
1787
1795
  useGetAccountLead: () => useGetAccountLead,
1788
1796
  useGetAccountLeads: () => useGetAccountLeads,
1789
1797
  useGetAccountLevels: () => useGetAccountLevels,
@@ -3058,6 +3066,39 @@ var useGetAccountInterests = (accountId = "", params = {}, options = {}) => {
3058
3066
  );
3059
3067
  };
3060
3068
 
3069
+ // src/queries/accounts/useGetAccountInvitations.ts
3070
+ var ACCOUNT_INVITATIONS_QUERY_KEY = () => ["ACCOUNT_INVITATIONS"];
3071
+ var SET_ACCOUNT_INVITATIONS_QUERY_DATA = (client, keyParams, response) => {
3072
+ client.setQueryData(ACCOUNT_INVITATIONS_QUERY_KEY(...keyParams), response);
3073
+ };
3074
+ var GetAccountInvitations = async ({
3075
+ pageParam,
3076
+ pageSize,
3077
+ orderBy,
3078
+ search,
3079
+ adminApiParams
3080
+ }) => {
3081
+ const adminApi = await GetAdminAPI(adminApiParams);
3082
+ const { data } = await adminApi.get(`/accounts/invitations`, {
3083
+ params: {
3084
+ page: pageParam || void 0,
3085
+ pageSize: pageSize || void 0,
3086
+ orderBy: orderBy || void 0,
3087
+ search: search || void 0
3088
+ }
3089
+ });
3090
+ return data;
3091
+ };
3092
+ var useGetAccountInvitations = (params = {}, options = {}) => {
3093
+ return useConnectedInfiniteQuery(
3094
+ ACCOUNT_INVITATIONS_QUERY_KEY(),
3095
+ (params2) => GetAccountInvitations({ ...params2 }),
3096
+ params,
3097
+ options,
3098
+ "accounts"
3099
+ );
3100
+ };
3101
+
3061
3102
  // src/queries/accounts/useGetAccountLeads.ts
3062
3103
  var ACCOUNT_LEADS_QUERY_KEY = (accountId, status, eventId) => {
3063
3104
  const key = [...ACCOUNT_QUERY_KEY(accountId), "LEADS"];
@@ -16516,6 +16557,31 @@ var useCreateAccountAddress = (options = {}) => {
16516
16557
  });
16517
16558
  };
16518
16559
 
16560
+ // src/mutations/account/useCreateAccountInvitations.ts
16561
+ var CreateAccountInvitations = async ({
16562
+ emails,
16563
+ adminApiParams,
16564
+ queryClient
16565
+ }) => {
16566
+ const connectedXM = await GetAdminAPI(adminApiParams);
16567
+ const { data } = await connectedXM.post(
16568
+ `/accounts/invitations`,
16569
+ emails
16570
+ );
16571
+ if (queryClient && data.status === "ok") {
16572
+ queryClient.invalidateQueries({
16573
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
16574
+ });
16575
+ }
16576
+ return data;
16577
+ };
16578
+ var useCreateAccountInvitations = (options = {}) => {
16579
+ return useConnectedMutation(CreateAccountInvitations, options, {
16580
+ domain: "accounts",
16581
+ type: "create"
16582
+ });
16583
+ };
16584
+
16519
16585
  // src/mutations/account/useDeleteAccount.ts
16520
16586
  var DeleteAccount = async ({
16521
16587
  accountId,
@@ -16564,6 +16630,30 @@ var useDeleteAccountAddress = (options = {}) => {
16564
16630
  });
16565
16631
  };
16566
16632
 
16633
+ // src/mutations/account/useDeleteAccountInvitation.ts
16634
+ var DeleteAccountInvitation = async ({
16635
+ email,
16636
+ adminApiParams,
16637
+ queryClient
16638
+ }) => {
16639
+ const connectedXM = await GetAdminAPI(adminApiParams);
16640
+ const { data } = await connectedXM.delete(
16641
+ `/accounts/invitations/${email}`
16642
+ );
16643
+ if (queryClient && data.status === "ok") {
16644
+ queryClient.invalidateQueries({
16645
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
16646
+ });
16647
+ }
16648
+ return data;
16649
+ };
16650
+ var useDeleteAccountInvitation = (options = {}) => {
16651
+ return useConnectedMutation(DeleteAccountInvitation, options, {
16652
+ domain: "accounts",
16653
+ type: "del"
16654
+ });
16655
+ };
16656
+
16567
16657
  // src/mutations/account/useDeleteAccountLead.ts
16568
16658
  var DeleteAccountLead = async ({
16569
16659
  accountId,
@@ -28529,6 +28619,7 @@ var useUpdateVideo = (options = {}) => {
28529
28619
  ACCOUNT_FOLLOWING_QUERY_KEY,
28530
28620
  ACCOUNT_GROUPS_QUERY_KEY,
28531
28621
  ACCOUNT_INTERESTS_QUERY_KEY,
28622
+ ACCOUNT_INVITATIONS_QUERY_KEY,
28532
28623
  ACCOUNT_LEADS_QUERY_KEY,
28533
28624
  ACCOUNT_LEAD_QUERY_KEY,
28534
28625
  ACCOUNT_LEVELS_QUERY_KEY,
@@ -28675,6 +28766,7 @@ var useUpdateVideo = (options = {}) => {
28675
28766
  ContentStatus,
28676
28767
  CreateAccount,
28677
28768
  CreateAccountAddress,
28769
+ CreateAccountInvitations,
28678
28770
  CreateActivity,
28679
28771
  CreateAdvertisement,
28680
28772
  CreateAnnouncement,
@@ -28768,6 +28860,7 @@ var useUpdateVideo = (options = {}) => {
28768
28860
  DelegateRole,
28769
28861
  DeleteAccount,
28770
28862
  DeleteAccountAddress,
28863
+ DeleteAccountInvitation,
28771
28864
  DeleteAccountLead,
28772
28865
  DeleteAccountPushDevice,
28773
28866
  DeleteActivity,
@@ -29042,6 +29135,7 @@ var useUpdateVideo = (options = {}) => {
29042
29135
  GetAccountFollowing,
29043
29136
  GetAccountGroups,
29044
29137
  GetAccountInterests,
29138
+ GetAccountInvitations,
29045
29139
  GetAccountLead,
29046
29140
  GetAccountLeads,
29047
29141
  GetAccountLevels,
@@ -29519,6 +29613,7 @@ var useUpdateVideo = (options = {}) => {
29519
29613
  SET_ACCOUNT_FOLLOWING_QUERY_DATA,
29520
29614
  SET_ACCOUNT_GROUPS_QUERY_DATA,
29521
29615
  SET_ACCOUNT_INTERESTS_QUERY_DATA,
29616
+ SET_ACCOUNT_INVITATIONS_QUERY_DATA,
29522
29617
  SET_ACCOUNT_LEADS_QUERY_DATA,
29523
29618
  SET_ACCOUNT_LEAD_QUERY_DATA,
29524
29619
  SET_ACCOUNT_LEVELS_QUERY_DATA,
@@ -30065,6 +30160,7 @@ var useUpdateVideo = (options = {}) => {
30065
30160
  useConnectedXM,
30066
30161
  useCreateAccount,
30067
30162
  useCreateAccountAddress,
30163
+ useCreateAccountInvitations,
30068
30164
  useCreateActivity,
30069
30165
  useCreateAdvertisement,
30070
30166
  useCreateAnnouncement,
@@ -30154,6 +30250,7 @@ var useUpdateVideo = (options = {}) => {
30154
30250
  useCreateTier,
30155
30251
  useDeleteAccount,
30156
30252
  useDeleteAccountAddress,
30253
+ useDeleteAccountInvitation,
30157
30254
  useDeleteAccountLead,
30158
30255
  useDeleteAccountPushDevice,
30159
30256
  useDeleteActivity,
@@ -30269,6 +30366,7 @@ var useUpdateVideo = (options = {}) => {
30269
30366
  useGetAccountFollowing,
30270
30367
  useGetAccountGroups,
30271
30368
  useGetAccountInterests,
30369
+ useGetAccountInvitations,
30272
30370
  useGetAccountLead,
30273
30371
  useGetAccountLeads,
30274
30372
  useGetAccountLevels,
package/dist/index.mjs CHANGED
@@ -777,6 +777,39 @@ var useGetAccountInterests = (accountId = "", params = {}, options = {}) => {
777
777
  );
778
778
  };
779
779
 
780
+ // src/queries/accounts/useGetAccountInvitations.ts
781
+ var ACCOUNT_INVITATIONS_QUERY_KEY = () => ["ACCOUNT_INVITATIONS"];
782
+ var SET_ACCOUNT_INVITATIONS_QUERY_DATA = (client, keyParams, response) => {
783
+ client.setQueryData(ACCOUNT_INVITATIONS_QUERY_KEY(...keyParams), response);
784
+ };
785
+ var GetAccountInvitations = async ({
786
+ pageParam,
787
+ pageSize,
788
+ orderBy,
789
+ search,
790
+ adminApiParams
791
+ }) => {
792
+ const adminApi = await GetAdminAPI(adminApiParams);
793
+ const { data } = await adminApi.get(`/accounts/invitations`, {
794
+ params: {
795
+ page: pageParam || void 0,
796
+ pageSize: pageSize || void 0,
797
+ orderBy: orderBy || void 0,
798
+ search: search || void 0
799
+ }
800
+ });
801
+ return data;
802
+ };
803
+ var useGetAccountInvitations = (params = {}, options = {}) => {
804
+ return useConnectedInfiniteQuery(
805
+ ACCOUNT_INVITATIONS_QUERY_KEY(),
806
+ (params2) => GetAccountInvitations({ ...params2 }),
807
+ params,
808
+ options,
809
+ "accounts"
810
+ );
811
+ };
812
+
780
813
  // src/queries/accounts/useGetAccountLeads.ts
781
814
  var ACCOUNT_LEADS_QUERY_KEY = (accountId, status, eventId) => {
782
815
  const key = [...ACCOUNT_QUERY_KEY(accountId), "LEADS"];
@@ -14238,6 +14271,31 @@ var useCreateAccountAddress = (options = {}) => {
14238
14271
  });
14239
14272
  };
14240
14273
 
14274
+ // src/mutations/account/useCreateAccountInvitations.ts
14275
+ var CreateAccountInvitations = async ({
14276
+ emails,
14277
+ adminApiParams,
14278
+ queryClient
14279
+ }) => {
14280
+ const connectedXM = await GetAdminAPI(adminApiParams);
14281
+ const { data } = await connectedXM.post(
14282
+ `/accounts/invitations`,
14283
+ emails
14284
+ );
14285
+ if (queryClient && data.status === "ok") {
14286
+ queryClient.invalidateQueries({
14287
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
14288
+ });
14289
+ }
14290
+ return data;
14291
+ };
14292
+ var useCreateAccountInvitations = (options = {}) => {
14293
+ return useConnectedMutation(CreateAccountInvitations, options, {
14294
+ domain: "accounts",
14295
+ type: "create"
14296
+ });
14297
+ };
14298
+
14241
14299
  // src/mutations/account/useDeleteAccount.ts
14242
14300
  var DeleteAccount = async ({
14243
14301
  accountId,
@@ -14286,6 +14344,30 @@ var useDeleteAccountAddress = (options = {}) => {
14286
14344
  });
14287
14345
  };
14288
14346
 
14347
+ // src/mutations/account/useDeleteAccountInvitation.ts
14348
+ var DeleteAccountInvitation = async ({
14349
+ email,
14350
+ adminApiParams,
14351
+ queryClient
14352
+ }) => {
14353
+ const connectedXM = await GetAdminAPI(adminApiParams);
14354
+ const { data } = await connectedXM.delete(
14355
+ `/accounts/invitations/${email}`
14356
+ );
14357
+ if (queryClient && data.status === "ok") {
14358
+ queryClient.invalidateQueries({
14359
+ queryKey: ACCOUNT_INVITATIONS_QUERY_KEY()
14360
+ });
14361
+ }
14362
+ return data;
14363
+ };
14364
+ var useDeleteAccountInvitation = (options = {}) => {
14365
+ return useConnectedMutation(DeleteAccountInvitation, options, {
14366
+ domain: "accounts",
14367
+ type: "del"
14368
+ });
14369
+ };
14370
+
14289
14371
  // src/mutations/account/useDeleteAccountLead.ts
14290
14372
  var DeleteAccountLead = async ({
14291
14373
  accountId,
@@ -26250,6 +26332,7 @@ export {
26250
26332
  ACCOUNT_FOLLOWING_QUERY_KEY,
26251
26333
  ACCOUNT_GROUPS_QUERY_KEY,
26252
26334
  ACCOUNT_INTERESTS_QUERY_KEY,
26335
+ ACCOUNT_INVITATIONS_QUERY_KEY,
26253
26336
  ACCOUNT_LEADS_QUERY_KEY,
26254
26337
  ACCOUNT_LEAD_QUERY_KEY,
26255
26338
  ACCOUNT_LEVELS_QUERY_KEY,
@@ -26396,6 +26479,7 @@ export {
26396
26479
  ContentStatus,
26397
26480
  CreateAccount,
26398
26481
  CreateAccountAddress,
26482
+ CreateAccountInvitations,
26399
26483
  CreateActivity,
26400
26484
  CreateAdvertisement,
26401
26485
  CreateAnnouncement,
@@ -26489,6 +26573,7 @@ export {
26489
26573
  DelegateRole,
26490
26574
  DeleteAccount,
26491
26575
  DeleteAccountAddress,
26576
+ DeleteAccountInvitation,
26492
26577
  DeleteAccountLead,
26493
26578
  DeleteAccountPushDevice,
26494
26579
  DeleteActivity,
@@ -26763,6 +26848,7 @@ export {
26763
26848
  GetAccountFollowing,
26764
26849
  GetAccountGroups,
26765
26850
  GetAccountInterests,
26851
+ GetAccountInvitations,
26766
26852
  GetAccountLead,
26767
26853
  GetAccountLeads,
26768
26854
  GetAccountLevels,
@@ -27240,6 +27326,7 @@ export {
27240
27326
  SET_ACCOUNT_FOLLOWING_QUERY_DATA,
27241
27327
  SET_ACCOUNT_GROUPS_QUERY_DATA,
27242
27328
  SET_ACCOUNT_INTERESTS_QUERY_DATA,
27329
+ SET_ACCOUNT_INVITATIONS_QUERY_DATA,
27243
27330
  SET_ACCOUNT_LEADS_QUERY_DATA,
27244
27331
  SET_ACCOUNT_LEAD_QUERY_DATA,
27245
27332
  SET_ACCOUNT_LEVELS_QUERY_DATA,
@@ -27786,6 +27873,7 @@ export {
27786
27873
  useConnectedXM,
27787
27874
  useCreateAccount,
27788
27875
  useCreateAccountAddress,
27876
+ useCreateAccountInvitations,
27789
27877
  useCreateActivity,
27790
27878
  useCreateAdvertisement,
27791
27879
  useCreateAnnouncement,
@@ -27875,6 +27963,7 @@ export {
27875
27963
  useCreateTier,
27876
27964
  useDeleteAccount,
27877
27965
  useDeleteAccountAddress,
27966
+ useDeleteAccountInvitation,
27878
27967
  useDeleteAccountLead,
27879
27968
  useDeleteAccountPushDevice,
27880
27969
  useDeleteActivity,
@@ -27990,6 +28079,7 @@ export {
27990
28079
  useGetAccountFollowing,
27991
28080
  useGetAccountGroups,
27992
28081
  useGetAccountInterests,
28082
+ useGetAccountInvitations,
27993
28083
  useGetAccountLead,
27994
28084
  useGetAccountLeads,
27995
28085
  useGetAccountLevels,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {