@connectedxm/admin 1.3.9 → 1.3.11
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.d.mts +126 -1
- package/dist/index.d.ts +126 -1
- package/dist/index.js +168 -0
- package/dist/index.mjs +155 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -46,6 +46,8 @@ __export(src_exports, {
|
|
|
46
46
|
ACCOUNT_FOLLOWING_QUERY_KEY: () => ACCOUNT_FOLLOWING_QUERY_KEY,
|
|
47
47
|
ACCOUNT_GROUPS_QUERY_KEY: () => ACCOUNT_GROUPS_QUERY_KEY,
|
|
48
48
|
ACCOUNT_INTERESTS_QUERY_KEY: () => ACCOUNT_INTERESTS_QUERY_KEY,
|
|
49
|
+
ACCOUNT_LEADS_QUERY_KEY: () => ACCOUNT_LEADS_QUERY_KEY,
|
|
50
|
+
ACCOUNT_LEAD_QUERY_KEY: () => ACCOUNT_LEAD_QUERY_KEY,
|
|
49
51
|
ACCOUNT_LEVELS_QUERY_KEY: () => ACCOUNT_LEVELS_QUERY_KEY,
|
|
50
52
|
ACCOUNT_LIKES_QUERY_KEY: () => ACCOUNT_LIKES_QUERY_KEY,
|
|
51
53
|
ACCOUNT_PAYMENTS_QUERY_KEY: () => ACCOUNT_PAYMENTS_QUERY_KEY,
|
|
@@ -251,6 +253,7 @@ __export(src_exports, {
|
|
|
251
253
|
DelegateRole: () => DelegateRole,
|
|
252
254
|
DeleteAccount: () => DeleteAccount,
|
|
253
255
|
DeleteAccountAddress: () => DeleteAccountAddress,
|
|
256
|
+
DeleteAccountLead: () => DeleteAccountLead,
|
|
254
257
|
DeleteActivity: () => DeleteActivity,
|
|
255
258
|
DeleteAdvertisement: () => DeleteAdvertisement,
|
|
256
259
|
DeleteAnnouncement: () => DeleteAnnouncement,
|
|
@@ -513,6 +516,8 @@ __export(src_exports, {
|
|
|
513
516
|
GetAccountFollowing: () => GetAccountFollowing,
|
|
514
517
|
GetAccountGroups: () => GetAccountGroups,
|
|
515
518
|
GetAccountInterests: () => GetAccountInterests,
|
|
519
|
+
GetAccountLead: () => GetAccountLead,
|
|
520
|
+
GetAccountLeads: () => GetAccountLeads,
|
|
516
521
|
GetAccountLevels: () => GetAccountLevels,
|
|
517
522
|
GetAccountLikes: () => GetAccountLikes,
|
|
518
523
|
GetAccountPayments: () => GetAccountPayments,
|
|
@@ -845,6 +850,7 @@ __export(src_exports, {
|
|
|
845
850
|
LEVEL_QUERY_KEY: () => LEVEL_QUERY_KEY,
|
|
846
851
|
LEVEL_TRANSLATIONS_QUERY_KEY: () => LEVEL_TRANSLATIONS_QUERY_KEY,
|
|
847
852
|
LEVEL_TRANSLATION_QUERY_KEY: () => LEVEL_TRANSLATION_QUERY_KEY,
|
|
853
|
+
LeadStatus: () => LeadStatus,
|
|
848
854
|
MergeInfinitePages: () => MergeInfinitePages,
|
|
849
855
|
NotificationType: () => NotificationType,
|
|
850
856
|
ORGANIZATION_DOMAIN_QUERY_KEY: () => ORGANIZATION_DOMAIN_QUERY_KEY,
|
|
@@ -960,6 +966,8 @@ __export(src_exports, {
|
|
|
960
966
|
SET_ACCOUNT_FOLLOWING_QUERY_DATA: () => SET_ACCOUNT_FOLLOWING_QUERY_DATA,
|
|
961
967
|
SET_ACCOUNT_GROUPS_QUERY_DATA: () => SET_ACCOUNT_GROUPS_QUERY_DATA,
|
|
962
968
|
SET_ACCOUNT_INTERESTS_QUERY_DATA: () => SET_ACCOUNT_INTERESTS_QUERY_DATA,
|
|
969
|
+
SET_ACCOUNT_LEADS_QUERY_DATA: () => SET_ACCOUNT_LEADS_QUERY_DATA,
|
|
970
|
+
SET_ACCOUNT_LEAD_QUERY_DATA: () => SET_ACCOUNT_LEAD_QUERY_DATA,
|
|
963
971
|
SET_ACCOUNT_LEVELS_QUERY_DATA: () => SET_ACCOUNT_LEVELS_QUERY_DATA,
|
|
964
972
|
SET_ACCOUNT_LIKES_QUERY_DATA: () => SET_ACCOUNT_LIKES_QUERY_DATA,
|
|
965
973
|
SET_ACCOUNT_PAYMENTS_QUERY_DATA: () => SET_ACCOUNT_PAYMENTS_QUERY_DATA,
|
|
@@ -1299,6 +1307,7 @@ __export(src_exports, {
|
|
|
1299
1307
|
UpdateAccount: () => UpdateAccount,
|
|
1300
1308
|
UpdateAccountAddress: () => UpdateAccountAddress,
|
|
1301
1309
|
UpdateAccountCognitoUserPassword: () => UpdateAccountCognitoUserPassword,
|
|
1310
|
+
UpdateAccountLead: () => UpdateAccountLead,
|
|
1302
1311
|
UpdateActivity: () => UpdateActivity,
|
|
1303
1312
|
UpdateAdvertisement: () => UpdateAdvertisement,
|
|
1304
1313
|
UpdateAnnouncement: () => UpdateAnnouncement,
|
|
@@ -1549,6 +1558,7 @@ __export(src_exports, {
|
|
|
1549
1558
|
useCreateTier: () => useCreateTier,
|
|
1550
1559
|
useDeleteAccount: () => useDeleteAccount,
|
|
1551
1560
|
useDeleteAccountAddress: () => useDeleteAccountAddress,
|
|
1561
|
+
useDeleteAccountLead: () => useDeleteAccountLead,
|
|
1552
1562
|
useDeleteActivity: () => useDeleteActivity,
|
|
1553
1563
|
useDeleteAdvertisement: () => useDeleteAdvertisement,
|
|
1554
1564
|
useDeleteAnnouncement: () => useDeleteAnnouncement,
|
|
@@ -1656,6 +1666,8 @@ __export(src_exports, {
|
|
|
1656
1666
|
useGetAccountFollowing: () => useGetAccountFollowing,
|
|
1657
1667
|
useGetAccountGroups: () => useGetAccountGroups,
|
|
1658
1668
|
useGetAccountInterests: () => useGetAccountInterests,
|
|
1669
|
+
useGetAccountLead: () => useGetAccountLead,
|
|
1670
|
+
useGetAccountLeads: () => useGetAccountLeads,
|
|
1659
1671
|
useGetAccountLevels: () => useGetAccountLevels,
|
|
1660
1672
|
useGetAccountLikes: () => useGetAccountLikes,
|
|
1661
1673
|
useGetAccountPayments: () => useGetAccountPayments,
|
|
@@ -2013,6 +2025,7 @@ __export(src_exports, {
|
|
|
2013
2025
|
useUpdateAccount: () => useUpdateAccount,
|
|
2014
2026
|
useUpdateAccountAddress: () => useUpdateAccountAddress,
|
|
2015
2027
|
useUpdateAccountCognitoUserPassword: () => useUpdateAccountCognitoUserPassword,
|
|
2028
|
+
useUpdateAccountLead: () => useUpdateAccountLead,
|
|
2016
2029
|
useUpdateActivity: () => useUpdateActivity,
|
|
2017
2030
|
useUpdateAdvertisement: () => useUpdateAdvertisement,
|
|
2018
2031
|
useUpdateAnnouncement: () => useUpdateAnnouncement,
|
|
@@ -2952,6 +2965,86 @@ var useGetAccountInterests = (accountId = "", params = {}, options = {}) => {
|
|
|
2952
2965
|
);
|
|
2953
2966
|
};
|
|
2954
2967
|
|
|
2968
|
+
// src/queries/accounts/useGetAccountLeads.ts
|
|
2969
|
+
var ACCOUNT_LEADS_QUERY_KEY = (accountId, status, eventId) => {
|
|
2970
|
+
const key = [...ACCOUNT_QUERY_KEY(accountId), "LEADS"];
|
|
2971
|
+
if (status) key.push(status);
|
|
2972
|
+
if (eventId) key.push(eventId);
|
|
2973
|
+
return key;
|
|
2974
|
+
};
|
|
2975
|
+
var SET_ACCOUNT_LEADS_QUERY_DATA = (client, keyParams, response) => {
|
|
2976
|
+
client.setQueryData(ACCOUNT_LEADS_QUERY_KEY(...keyParams), response);
|
|
2977
|
+
};
|
|
2978
|
+
var GetAccountLeads = async ({
|
|
2979
|
+
accountId,
|
|
2980
|
+
status,
|
|
2981
|
+
eventId,
|
|
2982
|
+
pageParam,
|
|
2983
|
+
pageSize,
|
|
2984
|
+
orderBy,
|
|
2985
|
+
search,
|
|
2986
|
+
adminApiParams
|
|
2987
|
+
}) => {
|
|
2988
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
2989
|
+
const { data } = await adminApi.get(`/accounts/${accountId}/leads`, {
|
|
2990
|
+
params: {
|
|
2991
|
+
page: pageParam || void 0,
|
|
2992
|
+
pageSize: pageSize || void 0,
|
|
2993
|
+
orderBy: orderBy || void 0,
|
|
2994
|
+
search: search || void 0,
|
|
2995
|
+
status: status || void 0,
|
|
2996
|
+
eventId: eventId || void 0
|
|
2997
|
+
}
|
|
2998
|
+
});
|
|
2999
|
+
return data;
|
|
3000
|
+
};
|
|
3001
|
+
var useGetAccountLeads = (accountId = "", status, eventId, params = {}, options = {}) => {
|
|
3002
|
+
return useConnectedInfiniteQuery(
|
|
3003
|
+
ACCOUNT_LEADS_QUERY_KEY(accountId, status, eventId),
|
|
3004
|
+
(params2) => GetAccountLeads({
|
|
3005
|
+
...params2,
|
|
3006
|
+
accountId,
|
|
3007
|
+
status,
|
|
3008
|
+
eventId
|
|
3009
|
+
}),
|
|
3010
|
+
params,
|
|
3011
|
+
{
|
|
3012
|
+
...options,
|
|
3013
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
3014
|
+
},
|
|
3015
|
+
"accounts"
|
|
3016
|
+
);
|
|
3017
|
+
};
|
|
3018
|
+
|
|
3019
|
+
// src/queries/accounts/useGetAccountLead.ts
|
|
3020
|
+
var ACCOUNT_LEAD_QUERY_KEY = (accountId, leadId) => [
|
|
3021
|
+
...ACCOUNT_LEADS_QUERY_KEY(accountId),
|
|
3022
|
+
leadId
|
|
3023
|
+
];
|
|
3024
|
+
var SET_ACCOUNT_LEAD_QUERY_DATA = (client, keyParams, response) => {
|
|
3025
|
+
client.setQueryData(ACCOUNT_LEAD_QUERY_KEY(...keyParams), response);
|
|
3026
|
+
};
|
|
3027
|
+
var GetAccountLead = async ({
|
|
3028
|
+
accountId = "",
|
|
3029
|
+
leadId = "",
|
|
3030
|
+
adminApiParams
|
|
3031
|
+
}) => {
|
|
3032
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
3033
|
+
const { data } = await adminApi.get(`/accounts/${accountId}/leads/${leadId}`);
|
|
3034
|
+
return data;
|
|
3035
|
+
};
|
|
3036
|
+
var useGetAccountLead = (accountId = "", leadId = "", options = {}) => {
|
|
3037
|
+
return useConnectedSingleQuery(
|
|
3038
|
+
ACCOUNT_LEAD_QUERY_KEY(accountId, leadId),
|
|
3039
|
+
(params) => GetAccountLead({ accountId, leadId, ...params }),
|
|
3040
|
+
{
|
|
3041
|
+
...options,
|
|
3042
|
+
enabled: !!accountId && !!leadId && (options?.enabled ?? true)
|
|
3043
|
+
},
|
|
3044
|
+
"accounts"
|
|
3045
|
+
);
|
|
3046
|
+
};
|
|
3047
|
+
|
|
2955
3048
|
// src/queries/accounts/useGetAccountLevels.ts
|
|
2956
3049
|
var ACCOUNT_LEVELS_QUERY_KEY = (accountId) => [
|
|
2957
3050
|
...ACCOUNT_QUERY_KEY(accountId),
|
|
@@ -11233,6 +11326,13 @@ var ThreadMessageType = /* @__PURE__ */ ((ThreadMessageType2) => {
|
|
|
11233
11326
|
ThreadMessageType2["system"] = "system";
|
|
11234
11327
|
return ThreadMessageType2;
|
|
11235
11328
|
})(ThreadMessageType || {});
|
|
11329
|
+
var LeadStatus = /* @__PURE__ */ ((LeadStatus2) => {
|
|
11330
|
+
LeadStatus2["new"] = "new";
|
|
11331
|
+
LeadStatus2["favorited"] = "favorited";
|
|
11332
|
+
LeadStatus2["archived"] = "archived";
|
|
11333
|
+
LeadStatus2["deleted"] = "deleted";
|
|
11334
|
+
return LeadStatus2;
|
|
11335
|
+
})(LeadStatus || {});
|
|
11236
11336
|
|
|
11237
11337
|
// src/queries/groups/useGetGroupInvitations.ts
|
|
11238
11338
|
var GROUP_INVITATIONS_QUERY_KEY = (groupId, status) => {
|
|
@@ -15339,6 +15439,34 @@ var useDeleteAccountAddress = (options = {}) => {
|
|
|
15339
15439
|
});
|
|
15340
15440
|
};
|
|
15341
15441
|
|
|
15442
|
+
// src/mutations/account/useDeleteAccountLead.ts
|
|
15443
|
+
var DeleteAccountLead = async ({
|
|
15444
|
+
accountId,
|
|
15445
|
+
leadId,
|
|
15446
|
+
adminApiParams,
|
|
15447
|
+
queryClient
|
|
15448
|
+
}) => {
|
|
15449
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
15450
|
+
const { data } = await connectedXM.delete(
|
|
15451
|
+
`/accounts/${accountId}/leads/${leadId}`
|
|
15452
|
+
);
|
|
15453
|
+
if (queryClient && data.status === "ok") {
|
|
15454
|
+
queryClient.invalidateQueries({
|
|
15455
|
+
queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
|
|
15456
|
+
});
|
|
15457
|
+
queryClient.invalidateQueries({
|
|
15458
|
+
queryKey: ACCOUNT_LEAD_QUERY_KEY(accountId, leadId)
|
|
15459
|
+
});
|
|
15460
|
+
}
|
|
15461
|
+
return data;
|
|
15462
|
+
};
|
|
15463
|
+
var useDeleteAccountLead = (options = {}) => {
|
|
15464
|
+
return useConnectedMutation(DeleteAccountLead, options, {
|
|
15465
|
+
domain: "accounts",
|
|
15466
|
+
type: "update"
|
|
15467
|
+
});
|
|
15468
|
+
};
|
|
15469
|
+
|
|
15342
15470
|
// src/mutations/account/useExportAccount.ts
|
|
15343
15471
|
var ExportAccount = async ({
|
|
15344
15472
|
accountId,
|
|
@@ -15616,6 +15744,33 @@ var useUpdateAccountCognitoUserPassword = (options = {}) => {
|
|
|
15616
15744
|
});
|
|
15617
15745
|
};
|
|
15618
15746
|
|
|
15747
|
+
// src/mutations/account/useUpdateAccountLead.ts
|
|
15748
|
+
var UpdateAccountLead = async ({
|
|
15749
|
+
accountId,
|
|
15750
|
+
leadId,
|
|
15751
|
+
lead,
|
|
15752
|
+
adminApiParams,
|
|
15753
|
+
queryClient
|
|
15754
|
+
}) => {
|
|
15755
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
15756
|
+
const { data } = await connectedXM.put(
|
|
15757
|
+
`/accounts/${accountId}/leads/${leadId}`,
|
|
15758
|
+
lead
|
|
15759
|
+
);
|
|
15760
|
+
if (queryClient && data.status === "ok") {
|
|
15761
|
+
queryClient.invalidateQueries({
|
|
15762
|
+
queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
|
|
15763
|
+
});
|
|
15764
|
+
}
|
|
15765
|
+
return data;
|
|
15766
|
+
};
|
|
15767
|
+
var useUpdateAccountLead = (options = {}) => {
|
|
15768
|
+
return useConnectedMutation(UpdateAccountLead, options, {
|
|
15769
|
+
domain: "accounts",
|
|
15770
|
+
type: "update"
|
|
15771
|
+
});
|
|
15772
|
+
};
|
|
15773
|
+
|
|
15619
15774
|
// src/mutations/activity/useAddActivityInterest.ts
|
|
15620
15775
|
var AddActivityInterest = async ({
|
|
15621
15776
|
activityId,
|
|
@@ -26333,6 +26488,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
26333
26488
|
ACCOUNT_FOLLOWING_QUERY_KEY,
|
|
26334
26489
|
ACCOUNT_GROUPS_QUERY_KEY,
|
|
26335
26490
|
ACCOUNT_INTERESTS_QUERY_KEY,
|
|
26491
|
+
ACCOUNT_LEADS_QUERY_KEY,
|
|
26492
|
+
ACCOUNT_LEAD_QUERY_KEY,
|
|
26336
26493
|
ACCOUNT_LEVELS_QUERY_KEY,
|
|
26337
26494
|
ACCOUNT_LIKES_QUERY_KEY,
|
|
26338
26495
|
ACCOUNT_PAYMENTS_QUERY_KEY,
|
|
@@ -26538,6 +26695,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
26538
26695
|
DelegateRole,
|
|
26539
26696
|
DeleteAccount,
|
|
26540
26697
|
DeleteAccountAddress,
|
|
26698
|
+
DeleteAccountLead,
|
|
26541
26699
|
DeleteActivity,
|
|
26542
26700
|
DeleteAdvertisement,
|
|
26543
26701
|
DeleteAnnouncement,
|
|
@@ -26800,6 +26958,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
26800
26958
|
GetAccountFollowing,
|
|
26801
26959
|
GetAccountGroups,
|
|
26802
26960
|
GetAccountInterests,
|
|
26961
|
+
GetAccountLead,
|
|
26962
|
+
GetAccountLeads,
|
|
26803
26963
|
GetAccountLevels,
|
|
26804
26964
|
GetAccountLikes,
|
|
26805
26965
|
GetAccountPayments,
|
|
@@ -27132,6 +27292,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
27132
27292
|
LEVEL_QUERY_KEY,
|
|
27133
27293
|
LEVEL_TRANSLATIONS_QUERY_KEY,
|
|
27134
27294
|
LEVEL_TRANSLATION_QUERY_KEY,
|
|
27295
|
+
LeadStatus,
|
|
27135
27296
|
MergeInfinitePages,
|
|
27136
27297
|
NotificationType,
|
|
27137
27298
|
ORGANIZATION_DOMAIN_QUERY_KEY,
|
|
@@ -27247,6 +27408,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
27247
27408
|
SET_ACCOUNT_FOLLOWING_QUERY_DATA,
|
|
27248
27409
|
SET_ACCOUNT_GROUPS_QUERY_DATA,
|
|
27249
27410
|
SET_ACCOUNT_INTERESTS_QUERY_DATA,
|
|
27411
|
+
SET_ACCOUNT_LEADS_QUERY_DATA,
|
|
27412
|
+
SET_ACCOUNT_LEAD_QUERY_DATA,
|
|
27250
27413
|
SET_ACCOUNT_LEVELS_QUERY_DATA,
|
|
27251
27414
|
SET_ACCOUNT_LIKES_QUERY_DATA,
|
|
27252
27415
|
SET_ACCOUNT_PAYMENTS_QUERY_DATA,
|
|
@@ -27586,6 +27749,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
27586
27749
|
UpdateAccount,
|
|
27587
27750
|
UpdateAccountAddress,
|
|
27588
27751
|
UpdateAccountCognitoUserPassword,
|
|
27752
|
+
UpdateAccountLead,
|
|
27589
27753
|
UpdateActivity,
|
|
27590
27754
|
UpdateAdvertisement,
|
|
27591
27755
|
UpdateAnnouncement,
|
|
@@ -27836,6 +28000,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
27836
28000
|
useCreateTier,
|
|
27837
28001
|
useDeleteAccount,
|
|
27838
28002
|
useDeleteAccountAddress,
|
|
28003
|
+
useDeleteAccountLead,
|
|
27839
28004
|
useDeleteActivity,
|
|
27840
28005
|
useDeleteAdvertisement,
|
|
27841
28006
|
useDeleteAnnouncement,
|
|
@@ -27943,6 +28108,8 @@ var useUpdateVideo = (options = {}) => {
|
|
|
27943
28108
|
useGetAccountFollowing,
|
|
27944
28109
|
useGetAccountGroups,
|
|
27945
28110
|
useGetAccountInterests,
|
|
28111
|
+
useGetAccountLead,
|
|
28112
|
+
useGetAccountLeads,
|
|
27946
28113
|
useGetAccountLevels,
|
|
27947
28114
|
useGetAccountLikes,
|
|
27948
28115
|
useGetAccountPayments,
|
|
@@ -28300,6 +28467,7 @@ var useUpdateVideo = (options = {}) => {
|
|
|
28300
28467
|
useUpdateAccount,
|
|
28301
28468
|
useUpdateAccountAddress,
|
|
28302
28469
|
useUpdateAccountCognitoUserPassword,
|
|
28470
|
+
useUpdateAccountLead,
|
|
28303
28471
|
useUpdateActivity,
|
|
28304
28472
|
useUpdateAdvertisement,
|
|
28305
28473
|
useUpdateAnnouncement,
|
package/dist/index.mjs
CHANGED
|
@@ -838,6 +838,86 @@ var useGetAccountInterests = (accountId = "", params = {}, options = {}) => {
|
|
|
838
838
|
);
|
|
839
839
|
};
|
|
840
840
|
|
|
841
|
+
// src/queries/accounts/useGetAccountLeads.ts
|
|
842
|
+
var ACCOUNT_LEADS_QUERY_KEY = (accountId, status, eventId) => {
|
|
843
|
+
const key = [...ACCOUNT_QUERY_KEY(accountId), "LEADS"];
|
|
844
|
+
if (status) key.push(status);
|
|
845
|
+
if (eventId) key.push(eventId);
|
|
846
|
+
return key;
|
|
847
|
+
};
|
|
848
|
+
var SET_ACCOUNT_LEADS_QUERY_DATA = (client, keyParams, response) => {
|
|
849
|
+
client.setQueryData(ACCOUNT_LEADS_QUERY_KEY(...keyParams), response);
|
|
850
|
+
};
|
|
851
|
+
var GetAccountLeads = async ({
|
|
852
|
+
accountId,
|
|
853
|
+
status,
|
|
854
|
+
eventId,
|
|
855
|
+
pageParam,
|
|
856
|
+
pageSize,
|
|
857
|
+
orderBy,
|
|
858
|
+
search,
|
|
859
|
+
adminApiParams
|
|
860
|
+
}) => {
|
|
861
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
862
|
+
const { data } = await adminApi.get(`/accounts/${accountId}/leads`, {
|
|
863
|
+
params: {
|
|
864
|
+
page: pageParam || void 0,
|
|
865
|
+
pageSize: pageSize || void 0,
|
|
866
|
+
orderBy: orderBy || void 0,
|
|
867
|
+
search: search || void 0,
|
|
868
|
+
status: status || void 0,
|
|
869
|
+
eventId: eventId || void 0
|
|
870
|
+
}
|
|
871
|
+
});
|
|
872
|
+
return data;
|
|
873
|
+
};
|
|
874
|
+
var useGetAccountLeads = (accountId = "", status, eventId, params = {}, options = {}) => {
|
|
875
|
+
return useConnectedInfiniteQuery(
|
|
876
|
+
ACCOUNT_LEADS_QUERY_KEY(accountId, status, eventId),
|
|
877
|
+
(params2) => GetAccountLeads({
|
|
878
|
+
...params2,
|
|
879
|
+
accountId,
|
|
880
|
+
status,
|
|
881
|
+
eventId
|
|
882
|
+
}),
|
|
883
|
+
params,
|
|
884
|
+
{
|
|
885
|
+
...options,
|
|
886
|
+
enabled: !!accountId && (options?.enabled ?? true)
|
|
887
|
+
},
|
|
888
|
+
"accounts"
|
|
889
|
+
);
|
|
890
|
+
};
|
|
891
|
+
|
|
892
|
+
// src/queries/accounts/useGetAccountLead.ts
|
|
893
|
+
var ACCOUNT_LEAD_QUERY_KEY = (accountId, leadId) => [
|
|
894
|
+
...ACCOUNT_LEADS_QUERY_KEY(accountId),
|
|
895
|
+
leadId
|
|
896
|
+
];
|
|
897
|
+
var SET_ACCOUNT_LEAD_QUERY_DATA = (client, keyParams, response) => {
|
|
898
|
+
client.setQueryData(ACCOUNT_LEAD_QUERY_KEY(...keyParams), response);
|
|
899
|
+
};
|
|
900
|
+
var GetAccountLead = async ({
|
|
901
|
+
accountId = "",
|
|
902
|
+
leadId = "",
|
|
903
|
+
adminApiParams
|
|
904
|
+
}) => {
|
|
905
|
+
const adminApi = await GetAdminAPI(adminApiParams);
|
|
906
|
+
const { data } = await adminApi.get(`/accounts/${accountId}/leads/${leadId}`);
|
|
907
|
+
return data;
|
|
908
|
+
};
|
|
909
|
+
var useGetAccountLead = (accountId = "", leadId = "", options = {}) => {
|
|
910
|
+
return useConnectedSingleQuery(
|
|
911
|
+
ACCOUNT_LEAD_QUERY_KEY(accountId, leadId),
|
|
912
|
+
(params) => GetAccountLead({ accountId, leadId, ...params }),
|
|
913
|
+
{
|
|
914
|
+
...options,
|
|
915
|
+
enabled: !!accountId && !!leadId && (options?.enabled ?? true)
|
|
916
|
+
},
|
|
917
|
+
"accounts"
|
|
918
|
+
);
|
|
919
|
+
};
|
|
920
|
+
|
|
841
921
|
// src/queries/accounts/useGetAccountLevels.ts
|
|
842
922
|
var ACCOUNT_LEVELS_QUERY_KEY = (accountId) => [
|
|
843
923
|
...ACCOUNT_QUERY_KEY(accountId),
|
|
@@ -9119,6 +9199,13 @@ var ThreadMessageType = /* @__PURE__ */ ((ThreadMessageType2) => {
|
|
|
9119
9199
|
ThreadMessageType2["system"] = "system";
|
|
9120
9200
|
return ThreadMessageType2;
|
|
9121
9201
|
})(ThreadMessageType || {});
|
|
9202
|
+
var LeadStatus = /* @__PURE__ */ ((LeadStatus2) => {
|
|
9203
|
+
LeadStatus2["new"] = "new";
|
|
9204
|
+
LeadStatus2["favorited"] = "favorited";
|
|
9205
|
+
LeadStatus2["archived"] = "archived";
|
|
9206
|
+
LeadStatus2["deleted"] = "deleted";
|
|
9207
|
+
return LeadStatus2;
|
|
9208
|
+
})(LeadStatus || {});
|
|
9122
9209
|
|
|
9123
9210
|
// src/queries/groups/useGetGroupInvitations.ts
|
|
9124
9211
|
var GROUP_INVITATIONS_QUERY_KEY = (groupId, status) => {
|
|
@@ -13228,6 +13315,34 @@ var useDeleteAccountAddress = (options = {}) => {
|
|
|
13228
13315
|
});
|
|
13229
13316
|
};
|
|
13230
13317
|
|
|
13318
|
+
// src/mutations/account/useDeleteAccountLead.ts
|
|
13319
|
+
var DeleteAccountLead = async ({
|
|
13320
|
+
accountId,
|
|
13321
|
+
leadId,
|
|
13322
|
+
adminApiParams,
|
|
13323
|
+
queryClient
|
|
13324
|
+
}) => {
|
|
13325
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
13326
|
+
const { data } = await connectedXM.delete(
|
|
13327
|
+
`/accounts/${accountId}/leads/${leadId}`
|
|
13328
|
+
);
|
|
13329
|
+
if (queryClient && data.status === "ok") {
|
|
13330
|
+
queryClient.invalidateQueries({
|
|
13331
|
+
queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
|
|
13332
|
+
});
|
|
13333
|
+
queryClient.invalidateQueries({
|
|
13334
|
+
queryKey: ACCOUNT_LEAD_QUERY_KEY(accountId, leadId)
|
|
13335
|
+
});
|
|
13336
|
+
}
|
|
13337
|
+
return data;
|
|
13338
|
+
};
|
|
13339
|
+
var useDeleteAccountLead = (options = {}) => {
|
|
13340
|
+
return useConnectedMutation(DeleteAccountLead, options, {
|
|
13341
|
+
domain: "accounts",
|
|
13342
|
+
type: "update"
|
|
13343
|
+
});
|
|
13344
|
+
};
|
|
13345
|
+
|
|
13231
13346
|
// src/mutations/account/useExportAccount.ts
|
|
13232
13347
|
var ExportAccount = async ({
|
|
13233
13348
|
accountId,
|
|
@@ -13505,6 +13620,33 @@ var useUpdateAccountCognitoUserPassword = (options = {}) => {
|
|
|
13505
13620
|
});
|
|
13506
13621
|
};
|
|
13507
13622
|
|
|
13623
|
+
// src/mutations/account/useUpdateAccountLead.ts
|
|
13624
|
+
var UpdateAccountLead = async ({
|
|
13625
|
+
accountId,
|
|
13626
|
+
leadId,
|
|
13627
|
+
lead,
|
|
13628
|
+
adminApiParams,
|
|
13629
|
+
queryClient
|
|
13630
|
+
}) => {
|
|
13631
|
+
const connectedXM = await GetAdminAPI(adminApiParams);
|
|
13632
|
+
const { data } = await connectedXM.put(
|
|
13633
|
+
`/accounts/${accountId}/leads/${leadId}`,
|
|
13634
|
+
lead
|
|
13635
|
+
);
|
|
13636
|
+
if (queryClient && data.status === "ok") {
|
|
13637
|
+
queryClient.invalidateQueries({
|
|
13638
|
+
queryKey: ACCOUNT_LEADS_QUERY_KEY(accountId)
|
|
13639
|
+
});
|
|
13640
|
+
}
|
|
13641
|
+
return data;
|
|
13642
|
+
};
|
|
13643
|
+
var useUpdateAccountLead = (options = {}) => {
|
|
13644
|
+
return useConnectedMutation(UpdateAccountLead, options, {
|
|
13645
|
+
domain: "accounts",
|
|
13646
|
+
type: "update"
|
|
13647
|
+
});
|
|
13648
|
+
};
|
|
13649
|
+
|
|
13508
13650
|
// src/mutations/activity/useAddActivityInterest.ts
|
|
13509
13651
|
var AddActivityInterest = async ({
|
|
13510
13652
|
activityId,
|
|
@@ -24221,6 +24363,8 @@ export {
|
|
|
24221
24363
|
ACCOUNT_FOLLOWING_QUERY_KEY,
|
|
24222
24364
|
ACCOUNT_GROUPS_QUERY_KEY,
|
|
24223
24365
|
ACCOUNT_INTERESTS_QUERY_KEY,
|
|
24366
|
+
ACCOUNT_LEADS_QUERY_KEY,
|
|
24367
|
+
ACCOUNT_LEAD_QUERY_KEY,
|
|
24224
24368
|
ACCOUNT_LEVELS_QUERY_KEY,
|
|
24225
24369
|
ACCOUNT_LIKES_QUERY_KEY,
|
|
24226
24370
|
ACCOUNT_PAYMENTS_QUERY_KEY,
|
|
@@ -24426,6 +24570,7 @@ export {
|
|
|
24426
24570
|
DelegateRole,
|
|
24427
24571
|
DeleteAccount,
|
|
24428
24572
|
DeleteAccountAddress,
|
|
24573
|
+
DeleteAccountLead,
|
|
24429
24574
|
DeleteActivity,
|
|
24430
24575
|
DeleteAdvertisement,
|
|
24431
24576
|
DeleteAnnouncement,
|
|
@@ -24688,6 +24833,8 @@ export {
|
|
|
24688
24833
|
GetAccountFollowing,
|
|
24689
24834
|
GetAccountGroups,
|
|
24690
24835
|
GetAccountInterests,
|
|
24836
|
+
GetAccountLead,
|
|
24837
|
+
GetAccountLeads,
|
|
24691
24838
|
GetAccountLevels,
|
|
24692
24839
|
GetAccountLikes,
|
|
24693
24840
|
GetAccountPayments,
|
|
@@ -25020,6 +25167,7 @@ export {
|
|
|
25020
25167
|
LEVEL_QUERY_KEY,
|
|
25021
25168
|
LEVEL_TRANSLATIONS_QUERY_KEY,
|
|
25022
25169
|
LEVEL_TRANSLATION_QUERY_KEY,
|
|
25170
|
+
LeadStatus,
|
|
25023
25171
|
MergeInfinitePages,
|
|
25024
25172
|
NotificationType,
|
|
25025
25173
|
ORGANIZATION_DOMAIN_QUERY_KEY,
|
|
@@ -25135,6 +25283,8 @@ export {
|
|
|
25135
25283
|
SET_ACCOUNT_FOLLOWING_QUERY_DATA,
|
|
25136
25284
|
SET_ACCOUNT_GROUPS_QUERY_DATA,
|
|
25137
25285
|
SET_ACCOUNT_INTERESTS_QUERY_DATA,
|
|
25286
|
+
SET_ACCOUNT_LEADS_QUERY_DATA,
|
|
25287
|
+
SET_ACCOUNT_LEAD_QUERY_DATA,
|
|
25138
25288
|
SET_ACCOUNT_LEVELS_QUERY_DATA,
|
|
25139
25289
|
SET_ACCOUNT_LIKES_QUERY_DATA,
|
|
25140
25290
|
SET_ACCOUNT_PAYMENTS_QUERY_DATA,
|
|
@@ -25474,6 +25624,7 @@ export {
|
|
|
25474
25624
|
UpdateAccount,
|
|
25475
25625
|
UpdateAccountAddress,
|
|
25476
25626
|
UpdateAccountCognitoUserPassword,
|
|
25627
|
+
UpdateAccountLead,
|
|
25477
25628
|
UpdateActivity,
|
|
25478
25629
|
UpdateAdvertisement,
|
|
25479
25630
|
UpdateAnnouncement,
|
|
@@ -25724,6 +25875,7 @@ export {
|
|
|
25724
25875
|
useCreateTier,
|
|
25725
25876
|
useDeleteAccount,
|
|
25726
25877
|
useDeleteAccountAddress,
|
|
25878
|
+
useDeleteAccountLead,
|
|
25727
25879
|
useDeleteActivity,
|
|
25728
25880
|
useDeleteAdvertisement,
|
|
25729
25881
|
useDeleteAnnouncement,
|
|
@@ -25831,6 +25983,8 @@ export {
|
|
|
25831
25983
|
useGetAccountFollowing,
|
|
25832
25984
|
useGetAccountGroups,
|
|
25833
25985
|
useGetAccountInterests,
|
|
25986
|
+
useGetAccountLead,
|
|
25987
|
+
useGetAccountLeads,
|
|
25834
25988
|
useGetAccountLevels,
|
|
25835
25989
|
useGetAccountLikes,
|
|
25836
25990
|
useGetAccountPayments,
|
|
@@ -26188,6 +26342,7 @@ export {
|
|
|
26188
26342
|
useUpdateAccount,
|
|
26189
26343
|
useUpdateAccountAddress,
|
|
26190
26344
|
useUpdateAccountCognitoUserPassword,
|
|
26345
|
+
useUpdateAccountLead,
|
|
26191
26346
|
useUpdateActivity,
|
|
26192
26347
|
useUpdateAdvertisement,
|
|
26193
26348
|
useUpdateAnnouncement,
|