@@ -436,6 +436,28 @@ export default class Security {
436436 return await this . transport . request ( { path, method, querystring, body } , options )
437437 }
438438
439+ async disableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
440+ async disableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
441+ async disableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
442+ async disableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < any > {
443+ const acceptedPath : string [ ] = [ 'uid' ]
444+ const querystring : Record < string , any > = { }
445+ const body = undefined
446+
447+ params = params ?? { }
448+ for ( const key in params ) {
449+ if ( acceptedPath . includes ( key ) ) {
450+ continue
451+ } else if ( key !== 'body' ) {
452+ querystring [ key ] = params [ key ]
453+ }
454+ }
455+
456+ const method = 'PUT'
457+ const path = `/_security/profile/${ encodeURIComponent ( params . uid . toString ( ) ) } /_disable`
458+ return await this . transport . request ( { path, method, querystring, body } , options )
459+ }
460+
439461 async enableUser ( this : That , params : T . SecurityEnableUserRequest | TB . SecurityEnableUserRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . SecurityEnableUserResponse >
440462 async enableUser ( this : That , params : T . SecurityEnableUserRequest | TB . SecurityEnableUserRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . SecurityEnableUserResponse , unknown > >
441463 async enableUser ( this : That , params : T . SecurityEnableUserRequest | TB . SecurityEnableUserRequest , options ?: TransportRequestOptions ) : Promise < T . SecurityEnableUserResponse >
@@ -458,6 +480,28 @@ export default class Security {
458480 return await this . transport . request ( { path, method, querystring, body } , options )
459481 }
460482
483+ async enableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
484+ async enableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
485+ async enableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
486+ async enableUserProfile ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < any > {
487+ const acceptedPath : string [ ] = [ 'uid' ]
488+ const querystring : Record < string , any > = { }
489+ const body = undefined
490+
491+ params = params ?? { }
492+ for ( const key in params ) {
493+ if ( acceptedPath . includes ( key ) ) {
494+ continue
495+ } else if ( key !== 'body' ) {
496+ querystring [ key ] = params [ key ]
497+ }
498+ }
499+
500+ const method = 'PUT'
501+ const path = `/_security/profile/${ encodeURIComponent ( params . uid . toString ( ) ) } /_enable`
502+ return await this . transport . request ( { path, method, querystring, body } , options )
503+ }
504+
461505 async enrollKibana ( this : That , params ?: T . SecurityEnrollKibanaRequest | TB . SecurityEnrollKibanaRequest , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . SecurityEnrollKibanaResponse >
462506 async enrollKibana ( this : That , params ?: T . SecurityEnrollKibanaRequest | TB . SecurityEnrollKibanaRequest , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . SecurityEnrollKibanaResponse , unknown > >
463507 async enrollKibana ( this : That , params ?: T . SecurityEnrollKibanaRequest | TB . SecurityEnrollKibanaRequest , options ?: TransportRequestOptions ) : Promise < T . SecurityEnrollKibanaResponse >
@@ -1377,6 +1421,28 @@ export default class Security {
13771421 return await this . transport . request ( { path, method, querystring, body } , options )
13781422 }
13791423
1424+ async searchUserProfiles ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
1425+ async searchUserProfiles ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
1426+ async searchUserProfiles ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
1427+ async searchUserProfiles ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < any > {
1428+ const acceptedPath : string [ ] = [ ]
1429+ const querystring : Record < string , any > = { }
1430+ const body = undefined
1431+
1432+ params = params ?? { }
1433+ for ( const key in params ) {
1434+ if ( acceptedPath . includes ( key ) ) {
1435+ continue
1436+ } else if ( key !== 'body' ) {
1437+ querystring [ key ] = params [ key ]
1438+ }
1439+ }
1440+
1441+ const method = body != null ? 'POST' : 'GET'
1442+ const path = '/_security/profile/_search'
1443+ return await this . transport . request ( { path, method, querystring, body } , options )
1444+ }
1445+
13801446 async updateUserProfileData ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithOutMeta ) : Promise < T . TODO >
13811447 async updateUserProfileData ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptionsWithMeta ) : Promise < TransportResult < T . TODO , unknown > >
13821448 async updateUserProfileData ( this : That , params ?: T . TODO | TB . TODO , options ?: TransportRequestOptions ) : Promise < T . TODO >
@@ -1394,8 +1460,8 @@ export default class Security {
13941460 }
13951461 }
13961462
1397- const method = 'POST '
1398- const path = `/_security/profile/_data/ ${ encodeURIComponent ( params . uid . toString ( ) ) } `
1463+ const method = 'PUT '
1464+ const path = `/_security/profile/${ encodeURIComponent ( params . uid . toString ( ) ) } /_data `
13991465 return await this . transport . request ( { path, method, querystring, body } , options )
14001466 }
14011467}
0 commit comments