https://supertokens.com/ logo
node question
i

IaS1506

04/26/2023, 2:11 PM
Hi @rp, I found out that in version 13.4.0 an api was added to search for users (a query parameter appeared). However, it was added only to supertokens.js along the path supertokens-node/lib/build/supertokens.js, and at the same time, the getUsers function with the optional query parameter is missing in the supertokens-node/lib/build/index.js file. For this reason, I cannot import and use it. I will be grateful for your help
r

rp

04/26/2023, 6:21 PM
hey @IaS1506 I don't think i understand the question. Can you please rephrase?
i

IaS1506

04/27/2023, 11:17 AM
And I want to import this method directly from supertokens-node
like
import { getUsersOldestFirst } from 'supertokens-node'
With that
import { getUsers } from 'supertokens-node'
But all methods I can import like this is in index.d.ts
r

rp

04/27/2023, 11:21 AM
ah right. So the getUsers function is not exposed. Instead the
getUsersOldestFirst
and
getUsersNewestFirst
are wrappers on top of this function
i

IaS1506

04/27/2023, 11:21 AM
But in functions you provided there is no query parameter
That i want to use
r

rp

04/27/2023, 11:22 AM
right. I see. So that's for internal use. What's the use case here?
You could also import like this:
import {getUsers} from "supertokens-node/lib/build/supertokens"
Maybe this will work.
but this is an internal import. so it might change in the future and not be a breaking change.. so be careful
i

IaS1506

04/27/2023, 11:23 AM
I want to implement search over users by email, id and other specific filters that you are not provided by search with tags
r

rp

04/27/2023, 11:24 AM
understood. We can expose the query params via the newest first and oldest first functions.. but that will be done in a few days.
i

IaS1506

04/27/2023, 11:24 AM
Ok thank you