expandUserFilter

Function

Prior to serialization into the query syntax for the backing APIs, we first expand Filters

Filter's can express their intent in a very terse form, but to ensure consistent structures we expand them into their more verbose form.

i.e. firstname: "John" expands into firstname: { any: ["John"]}

  • Fields defined as string | string[] | MatchOptions will be converted to a MatchOptions
  • RelativeDate fields are converted to DateRange

Parameters

Parameter Type Default Notes
filter Required Filter<"user">

Returns

Property Type Notes
created Optional IDateRange<number> | IRelativeDate
disabled Optional boolean
email Optional string | string[] | IMatchOptions
firstname Optional string | string[] | IMatchOptions
fullname Optional string | string[] | IMatchOptions
groups Optional string | string[] | IMatchOptions
lastlogin Optional IDateRange<number> | IRelativeDate
lastname Optional string | string[] | IMatchOptions
modified Optional IDateRange<number> | IRelativeDate
role Optional string | string[] | IMatchOptions
term Optional string
userlicensetype Optional string | string[] | IMatchOptions
username Optional string | string[] | IMatchOptions

Function defined in common/src/search/user-utils.ts:87