@connectedxm/admin 2.8.16 → 2.8.17
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.cjs +12 -6
- package/dist/index.d.cts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +12 -6
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3218,9 +3218,11 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options = {
|
|
|
3218
3218
|
};
|
|
3219
3219
|
|
|
3220
3220
|
// src/queries/accounts/useGetAccounts.ts
|
|
3221
|
-
var ACCOUNTS_QUERY_KEY = (accountType) => {
|
|
3221
|
+
var ACCOUNTS_QUERY_KEY = (accountType, verified, online) => {
|
|
3222
3222
|
const keys = ["ACCOUNTS"];
|
|
3223
3223
|
if (accountType) keys.push(accountType);
|
|
3224
|
+
if (typeof verified !== "undefined") keys.push(verified ? "VERIFIED" : "UNVERIFIED");
|
|
3225
|
+
if (typeof online !== "undefined") keys.push(online ? "ONLINE" : "OFFLINE");
|
|
3224
3226
|
return keys;
|
|
3225
3227
|
};
|
|
3226
3228
|
var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -3232,7 +3234,9 @@ var GetAccounts = async ({
|
|
|
3232
3234
|
orderBy,
|
|
3233
3235
|
accountType,
|
|
3234
3236
|
search,
|
|
3235
|
-
adminApiParams
|
|
3237
|
+
adminApiParams,
|
|
3238
|
+
verified,
|
|
3239
|
+
online
|
|
3236
3240
|
}) => {
|
|
3237
3241
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
3238
3242
|
const { data } = await adminApi.get(`/accounts`, {
|
|
@@ -3241,15 +3245,17 @@ var GetAccounts = async ({
|
|
|
3241
3245
|
pageSize: pageSize || void 0,
|
|
3242
3246
|
orderBy: orderBy || void 0,
|
|
3243
3247
|
accountType: accountType || void 0,
|
|
3244
|
-
search: search || void 0
|
|
3248
|
+
search: search || void 0,
|
|
3249
|
+
verified: verified || void 0,
|
|
3250
|
+
online: online || void 0
|
|
3245
3251
|
}
|
|
3246
3252
|
});
|
|
3247
3253
|
return data;
|
|
3248
3254
|
};
|
|
3249
|
-
var useGetAccounts = (accountType, params = {}, options = {}) => {
|
|
3255
|
+
var useGetAccounts = (accountType, verified, online, params = {}, options = {}) => {
|
|
3250
3256
|
return useConnectedInfiniteQuery(
|
|
3251
|
-
ACCOUNTS_QUERY_KEY(accountType),
|
|
3252
|
-
(params2) => GetAccounts({ ...params2, accountType }),
|
|
3257
|
+
ACCOUNTS_QUERY_KEY(accountType, verified, online),
|
|
3258
|
+
(params2) => GetAccounts({ ...params2, accountType, verified, online }),
|
|
3253
3259
|
params,
|
|
3254
3260
|
options,
|
|
3255
3261
|
"accounts"
|
package/dist/index.d.cts
CHANGED
|
@@ -6256,7 +6256,7 @@ declare const useGetAccountTiers: (accountId?: string, type?: "external" | "inte
|
|
|
6256
6256
|
* @category Keys
|
|
6257
6257
|
* @group Accounts
|
|
6258
6258
|
*/
|
|
6259
|
-
declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team") => string[];
|
|
6259
|
+
declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team", verified?: boolean, online?: boolean) => string[];
|
|
6260
6260
|
/**
|
|
6261
6261
|
* @category Setters
|
|
6262
6262
|
* @group Accounts
|
|
@@ -6264,17 +6264,19 @@ declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team") => string[]
|
|
|
6264
6264
|
declare const SET_ACCOUNTS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof ACCOUNTS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetAccounts>>) => void;
|
|
6265
6265
|
interface GetAccountsProps extends InfiniteQueryParams {
|
|
6266
6266
|
accountType?: "account" | "team";
|
|
6267
|
+
verified?: boolean;
|
|
6268
|
+
online?: boolean;
|
|
6267
6269
|
}
|
|
6268
6270
|
/**
|
|
6269
6271
|
* @category Queries
|
|
6270
6272
|
* @group Accounts
|
|
6271
6273
|
*/
|
|
6272
|
-
declare const GetAccounts: ({ pageParam, pageSize, orderBy, accountType, search, adminApiParams, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
|
|
6274
|
+
declare const GetAccounts: ({ pageParam, pageSize, orderBy, accountType, search, adminApiParams, verified, online, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
|
|
6273
6275
|
/**
|
|
6274
6276
|
* @category Hooks
|
|
6275
6277
|
* @group Accounts
|
|
6276
6278
|
*/
|
|
6277
|
-
declare const useGetAccounts: (accountType?: "account" | "team", params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
6279
|
+
declare const useGetAccounts: (accountType?: "account" | "team", verified?: boolean, online?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
6278
6280
|
|
|
6279
6281
|
/**
|
|
6280
6282
|
* @category Keys
|
package/dist/index.d.ts
CHANGED
|
@@ -6256,7 +6256,7 @@ declare const useGetAccountTiers: (accountId?: string, type?: "external" | "inte
|
|
|
6256
6256
|
* @category Keys
|
|
6257
6257
|
* @group Accounts
|
|
6258
6258
|
*/
|
|
6259
|
-
declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team") => string[];
|
|
6259
|
+
declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team", verified?: boolean, online?: boolean) => string[];
|
|
6260
6260
|
/**
|
|
6261
6261
|
* @category Setters
|
|
6262
6262
|
* @group Accounts
|
|
@@ -6264,17 +6264,19 @@ declare const ACCOUNTS_QUERY_KEY: (accountType?: "account" | "team") => string[]
|
|
|
6264
6264
|
declare const SET_ACCOUNTS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof ACCOUNTS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetAccounts>>) => void;
|
|
6265
6265
|
interface GetAccountsProps extends InfiniteQueryParams {
|
|
6266
6266
|
accountType?: "account" | "team";
|
|
6267
|
+
verified?: boolean;
|
|
6268
|
+
online?: boolean;
|
|
6267
6269
|
}
|
|
6268
6270
|
/**
|
|
6269
6271
|
* @category Queries
|
|
6270
6272
|
* @group Accounts
|
|
6271
6273
|
*/
|
|
6272
|
-
declare const GetAccounts: ({ pageParam, pageSize, orderBy, accountType, search, adminApiParams, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
|
|
6274
|
+
declare const GetAccounts: ({ pageParam, pageSize, orderBy, accountType, search, adminApiParams, verified, online, }: GetAccountsProps) => Promise<ConnectedXMResponse<Account[]>>;
|
|
6273
6275
|
/**
|
|
6274
6276
|
* @category Hooks
|
|
6275
6277
|
* @group Accounts
|
|
6276
6278
|
*/
|
|
6277
|
-
declare const useGetAccounts: (accountType?: "account" | "team", params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
6279
|
+
declare const useGetAccounts: (accountType?: "account" | "team", verified?: boolean, online?: boolean, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetAccounts>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Account[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
|
|
6278
6280
|
|
|
6279
6281
|
/**
|
|
6280
6282
|
* @category Keys
|
package/dist/index.js
CHANGED
|
@@ -190,9 +190,11 @@ var useConnectedInfiniteQuery = (queryKeys, queryFn, params = {}, options = {
|
|
|
190
190
|
};
|
|
191
191
|
|
|
192
192
|
// src/queries/accounts/useGetAccounts.ts
|
|
193
|
-
var ACCOUNTS_QUERY_KEY = (accountType) => {
|
|
193
|
+
var ACCOUNTS_QUERY_KEY = (accountType, verified, online) => {
|
|
194
194
|
const keys = ["ACCOUNTS"];
|
|
195
195
|
if (accountType) keys.push(accountType);
|
|
196
|
+
if (typeof verified !== "undefined") keys.push(verified ? "VERIFIED" : "UNVERIFIED");
|
|
197
|
+
if (typeof online !== "undefined") keys.push(online ? "ONLINE" : "OFFLINE");
|
|
196
198
|
return keys;
|
|
197
199
|
};
|
|
198
200
|
var SET_ACCOUNTS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -204,7 +206,9 @@ var GetAccounts = async ({
|
|
|
204
206
|
orderBy,
|
|
205
207
|
accountType,
|
|
206
208
|
search,
|
|
207
|
-
adminApiParams
|
|
209
|
+
adminApiParams,
|
|
210
|
+
verified,
|
|
211
|
+
online
|
|
208
212
|
}) => {
|
|
209
213
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
210
214
|
const { data } = await adminApi.get(`/accounts`, {
|
|
@@ -213,15 +217,17 @@ var GetAccounts = async ({
|
|
|
213
217
|
pageSize: pageSize || void 0,
|
|
214
218
|
orderBy: orderBy || void 0,
|
|
215
219
|
accountType: accountType || void 0,
|
|
216
|
-
search: search || void 0
|
|
220
|
+
search: search || void 0,
|
|
221
|
+
verified: verified || void 0,
|
|
222
|
+
online: online || void 0
|
|
217
223
|
}
|
|
218
224
|
});
|
|
219
225
|
return data;
|
|
220
226
|
};
|
|
221
|
-
var useGetAccounts = (accountType, params = {}, options = {}) => {
|
|
227
|
+
var useGetAccounts = (accountType, verified, online, params = {}, options = {}) => {
|
|
222
228
|
return useConnectedInfiniteQuery(
|
|
223
|
-
ACCOUNTS_QUERY_KEY(accountType),
|
|
224
|
-
(params2) => GetAccounts({ ...params2, accountType }),
|
|
229
|
+
ACCOUNTS_QUERY_KEY(accountType, verified, online),
|
|
230
|
+
(params2) => GetAccounts({ ...params2, accountType, verified, online }),
|
|
225
231
|
params,
|
|
226
232
|
options,
|
|
227
233
|
"accounts"
|