@@ -32,6 +32,26 @@ import { fetchManyMemberIdentities, fetchManyMemberOrgs, fetchManyMemberSegments
3232
3333const log = getServiceLogger ( )
3434
35+ interface IQueryMembersAdvancedParams {
36+ filter ?: Record < string , any >
37+ search ?: string | null
38+ limit ?: number
39+ offset ?: number
40+ orderBy ?: string
41+ segmentId ?: string
42+ countOnly ?: boolean
43+ fields ?: string [ ]
44+ include ?: {
45+ identities ?: boolean
46+ segments ?: boolean
47+ lfxMemberships ?: boolean
48+ memberOrganizations ?: boolean
49+ onlySubProjects ?: boolean
50+ maintainers ?: boolean
51+ }
52+ attributeSettings ?: IDbMemberAttributeSetting [ ]
53+ }
54+
3555export enum MemberField {
3656 ATTRIBUTES = 'attributes' ,
3757 CONTRIBUTIONS = 'contributions' ,
@@ -246,7 +266,7 @@ export async function executeQuery(
246266 maintainers ?: boolean
247267 } ,
248268 attributeSettings = [ ] as IDbMemberAttributeSetting [ ] ,
249- } ,
269+ } : IQueryMembersAdvancedParams ,
250270) : Promise < PageData < IDbMemberData > > {
251271 const cache = new MemberQueryCache ( redis )
252272 const withAggregates = ! ! segmentId
@@ -465,7 +485,7 @@ async function refreshCacheInBackground(
465485 qx : QueryExecutor ,
466486 redis : RedisClient ,
467487 cacheKey : string ,
468- params : any ,
488+ params : IQueryMembersAdvancedParams ,
469489) : Promise < void > {
470490 try {
471491 log . info ( `Refreshing members advanced query cache in background: ${ cacheKey } ` )
@@ -479,7 +499,7 @@ async function refreshCountCacheInBackground(
479499 qx : QueryExecutor ,
480500 redis : RedisClient ,
481501 cacheKey : string ,
482- params : any ,
502+ params : IQueryMembersAdvancedParams ,
483503) : Promise < void > {
484504 try {
485505 log . info ( `Refreshing members advanced count cache in background: ${ cacheKey } ` )
0 commit comments