|
@@ -16,7 +16,8 @@ export const useSWRxUsersList = (userIds: string[]): SWRResponse<IUserHasId[], E
|
|
|
);
|
|
);
|
|
|
};
|
|
};
|
|
|
|
|
|
|
|
-type usernameRequertOptions = {
|
|
|
|
|
|
|
+
|
|
|
|
|
+type usernameRequestOptions = {
|
|
|
isIncludeActiveUsernames?: boolean,
|
|
isIncludeActiveUsernames?: boolean,
|
|
|
isIncludeInactiveUsernames?: boolean,
|
|
isIncludeInactiveUsernames?: boolean,
|
|
|
isIncludeActivitySnapshotUsernames?: boolean,
|
|
isIncludeActivitySnapshotUsernames?: boolean,
|
|
@@ -28,14 +29,14 @@ type userData = {
|
|
|
totalCount: number
|
|
totalCount: number
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-type usernameResponse = {
|
|
|
|
|
|
|
+type usernameResult = {
|
|
|
activeUser?: userData
|
|
activeUser?: userData
|
|
|
inactiveUser?: userData
|
|
inactiveUser?: userData
|
|
|
activitySnapshotUser?: userData
|
|
activitySnapshotUser?: userData
|
|
|
mixedUsernames: string[]
|
|
mixedUsernames: string[]
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-export const useSWRxUsernames = (q: string, offset?: number, limit?: number, options?: usernameRequertOptions): SWRResponse<usernameResponse, Error> => {
|
|
|
|
|
|
|
+export const useSWRxUsernames = (q: string, offset?: number, limit?: number, options?: usernameRequestOptions): SWRResponse<usernameResult, Error> => {
|
|
|
return useSWRImmutable(
|
|
return useSWRImmutable(
|
|
|
q != null ? ['/users/usernames', q, offset, limit, options] : null,
|
|
q != null ? ['/users/usernames', q, offset, limit, options] : null,
|
|
|
(endpoint, q, offset, limit, options) => apiv3Get(endpoint, {
|
|
(endpoint, q, offset, limit, options) => apiv3Get(endpoint, {
|