Interface IHooksClient
- Namespace
- Auth0.ManagementApi.Clients
- Assembly
- Auth0.ManagementApi.dll
public interface IHooksClient
Methods
CreateAsync(HookCreateRequest, CancellationToken)
Creates a new hook according to the request.
Task<Hook> CreateAsync(HookCreateRequest request, CancellationToken cancellationToken = default)
Parameters
request
HookCreateRequestThe HookCreateRequest containing the details of the hook to create.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
DeleteAsync(string, CancellationToken)
Deletes a hook.
Task DeleteAsync(string id, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the hook to delete.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
GetAllAsync(GetHooksRequest, PaginationInfo, CancellationToken)
Retrieves a list of all hooks.
Task<IPagedList<Hook>> GetAllAsync(GetHooksRequest request, PaginationInfo pagination = null, CancellationToken cancellationToken = default)
Parameters
request
GetHooksRequestSpecifies criteria to use when querying hooks.
pagination
PaginationInfoSpecifies pagination info to use when requesting paged results.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
- Task<IPagedList<Hook>>
An IPagedList<T> containing the hooks requested.
GetAsync(string, string, CancellationToken)
Retrieves a hook by its ID.
Task<Hook> GetAsync(string id, string fields = null, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the hook to retrieve.
fields
stringA comma separated list of fields to include, empty to retrieve all fields.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.
Returns
UpdateAsync(string, HookUpdateRequest, CancellationToken)
Updates a hook.
Task<Hook> UpdateAsync(string id, HookUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
id
stringThe ID of the hook to update.
request
HookUpdateRequestA HookUpdateRequest containing the information to update.
cancellationToken
CancellationTokenThe cancellation token to cancel operation.