@@ -119,6 +119,27 @@ export interface paths {
119119 patch ?: never ;
120120 trace ?: never ;
121121 } ;
122+ "/ocs/v2.php/apps/profile_fields/api/v1/users/search" : {
123+ parameters : {
124+ query ?: never ;
125+ header ?: never ;
126+ path ?: never ;
127+ cookie ?: never ;
128+ } ;
129+ /**
130+ * Search users by one profile field filter
131+ * @description Return a paginated list of users that match one explicit profile field filter. The response includes only the field/value pair that produced the match, not the full profile.
132+ * This endpoint requires admin access
133+ */
134+ get : operations [ "field_value_admin_api-search" ] ;
135+ put ?: never ;
136+ post ?: never ;
137+ delete ?: never ;
138+ options ?: never ;
139+ head ?: never ;
140+ patch ?: never ;
141+ trace ?: never ;
142+ } ;
122143}
123144export type webhooks = Record < string , never > ;
124145export interface components {
@@ -139,13 +160,35 @@ export interface components {
139160 created_at : string ;
140161 updated_at : string ;
141162 } ;
163+ LookupField : {
164+ definition : components [ "schemas" ] [ "Definition" ] ;
165+ value : components [ "schemas" ] [ "ValueRecord" ] ;
166+ } ;
142167 OCSMeta : {
143168 status : string ;
144169 statuscode : number ;
145170 message ?: string ;
146171 totalitems ?: string ;
147172 itemsperpage ?: string ;
148173 } ;
174+ SearchItem : {
175+ user_uid : string ;
176+ display_name : string ;
177+ fields : {
178+ [ key : string ] : components [ "schemas" ] [ "LookupField" ] ;
179+ } ;
180+ } ;
181+ SearchResult : {
182+ items : components [ "schemas" ] [ "SearchItem" ] [ ] ;
183+ pagination : {
184+ /** Format: int64 */
185+ limit : number ;
186+ /** Format: int64 */
187+ offset : number ;
188+ /** Format: int64 */
189+ total : number ;
190+ } ;
191+ } ;
149192 /** @enum {string} */
150193 Type : "text" | "number" ;
151194 ValuePayload : {
@@ -674,4 +717,91 @@ export interface operations {
674717 } ;
675718 } ;
676719 } ;
720+ "field_value_admin_api-search" : {
721+ parameters : {
722+ query : {
723+ /** @description Immutable key of the field to filter by */
724+ fieldKey : string ;
725+ /** @description Explicit search operator, currently `eq` or `contains` */
726+ operator ?: string ;
727+ /** @description Value payload to compare against the stored field value */
728+ value ?: string | null ;
729+ /** @description Maximum number of users to return in the current page */
730+ limit ?: number ;
731+ /** @description Zero-based offset into the matched result set */
732+ offset ?: number ;
733+ } ;
734+ header : {
735+ /** @description Required to be true for the API request to pass */
736+ "OCS-APIRequest" : boolean ;
737+ } ;
738+ path ?: never ;
739+ cookie ?: never ;
740+ } ;
741+ requestBody ?: never ;
742+ responses : {
743+ /** @description User search completed successfully */
744+ 200 : {
745+ headers : {
746+ [ name : string ] : unknown ;
747+ } ;
748+ content : {
749+ "application/json" : {
750+ ocs : {
751+ meta : components [ "schemas" ] [ "OCSMeta" ] ;
752+ data : components [ "schemas" ] [ "SearchResult" ] ;
753+ } ;
754+ } ;
755+ } ;
756+ } ;
757+ /** @description Invalid search filter or pagination values */
758+ 400 : {
759+ headers : {
760+ [ name : string ] : unknown ;
761+ } ;
762+ content : {
763+ "application/json" : {
764+ ocs : {
765+ meta : components [ "schemas" ] [ "OCSMeta" ] ;
766+ data : {
767+ message : string ;
768+ } ;
769+ } ;
770+ } ;
771+ } ;
772+ } ;
773+ /** @description Authenticated admin user is required */
774+ 401 : {
775+ headers : {
776+ [ name : string ] : unknown ;
777+ } ;
778+ content : {
779+ "application/json" : {
780+ ocs : {
781+ meta : components [ "schemas" ] [ "OCSMeta" ] ;
782+ data : {
783+ message : string ;
784+ } ;
785+ } ;
786+ } ;
787+ } ;
788+ } ;
789+ /** @description Search field definition not found */
790+ 404 : {
791+ headers : {
792+ [ name : string ] : unknown ;
793+ } ;
794+ content : {
795+ "application/json" : {
796+ ocs : {
797+ meta : components [ "schemas" ] [ "OCSMeta" ] ;
798+ data : {
799+ message : string ;
800+ } ;
801+ } ;
802+ } ;
803+ } ;
804+ } ;
805+ } ;
806+ } ;
677807}
0 commit comments