Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 9 additions & 3 deletions .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

285 changes: 183 additions & 102 deletions reference.md

Large diffs are not rendered by default.

633 changes: 528 additions & 105 deletions src/Auth0.ManagementApi/Actions/ActionsClient.cs

Large diffs are not rendered by default.

82 changes: 74 additions & 8 deletions src/Auth0.ManagementApi/Actions/Executions/ExecutionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
CancellationToken cancellationToken = default
)
{
var _queryString = new Auth0.ManagementApi.Core.QueryStringBuilder.Builder(capacity: 0)
.MergeAdditional(options?.AdditionalQueryParameters)
.Build();
var _headers = await new Auth0.ManagementApi.Core.HeadersBuilder.Builder()
.Add(_client.Options.Headers)
.Add(_client.Options.AdditionalHeaders)
Expand All @@ -34,6 +37,7 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
"actions/executions/{0}",
ValueConvert.ToPathParameterString(id)
),
QueryString = _queryString,
Headers = _headers,
Options = options,
},
Expand All @@ -53,7 +57,7 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
return new WithRawResponse<GetActionExecutionResponseContent>()
{
Data = responseData,
RawResponse = new RawResponse()
RawResponse = new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"),
Expand All @@ -67,7 +71,13 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
"Failed to deserialize response",
response.StatusCode,
null,
e
e,
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
}
}
Expand All @@ -80,15 +90,65 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
switch (response.StatusCode)
{
case 400:
throw new BadRequestError(JsonUtils.Deserialize<object>(responseBody));
throw new BadRequestError(
JsonUtils.Deserialize<object>(responseBody),
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url =
response.Raw.RequestMessage?.RequestUri
?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
case 401:
throw new UnauthorizedError(JsonUtils.Deserialize<object>(responseBody));
throw new UnauthorizedError(
JsonUtils.Deserialize<object>(responseBody),
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url =
response.Raw.RequestMessage?.RequestUri
?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
case 403:
throw new ForbiddenError(JsonUtils.Deserialize<object>(responseBody));
throw new ForbiddenError(
JsonUtils.Deserialize<object>(responseBody),
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url =
response.Raw.RequestMessage?.RequestUri
?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
case 404:
throw new NotFoundError(JsonUtils.Deserialize<object>(responseBody));
throw new NotFoundError(
JsonUtils.Deserialize<object>(responseBody),
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url =
response.Raw.RequestMessage?.RequestUri
?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
case 429:
throw new TooManyRequestsError(JsonUtils.Deserialize<object>(responseBody));
throw new TooManyRequestsError(
JsonUtils.Deserialize<object>(responseBody),
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url =
response.Raw.RequestMessage?.RequestUri
?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
}
}
catch (JsonException)
Expand All @@ -98,7 +158,13 @@ private async Task<WithRawResponse<GetActionExecutionResponseContent>> GetAsyncC
throw new ManagementApiException(
$"Error with status code {response.StatusCode}",
response.StatusCode,
responseBody
responseBody,
rawResponse: new Auth0.ManagementApi.RawResponse()
{
StatusCode = response.Raw.StatusCode,
Url = response.Raw.RequestMessage?.RequestUri ?? new Uri("about:blank"),
Headers = ResponseHeaders.FromHttpResponseMessage(response.Raw),
}
);
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/Auth0.ManagementApi/Actions/IActionsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ WithRawResponseTask<GetActionResponseContent> GetAsync(
/// <summary>
/// Deletes an action and all of its associated versions. An action must be unbound from all triggers before it can be deleted.
/// </summary>
Task DeleteAsync(
WithRawResponseTask DeleteAsync(
string id,
DeleteActionRequestParameters request,
RequestOptions? options = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ WithRawResponseTask<GetActionModuleResponseContent> GetAsync(
/// <summary>
/// Permanently delete an Actions Module. This will fail if the module is still in use by any actions.
/// </summary>
Task DeleteAsync(
WithRawResponseTask DeleteAsync(
string id,
RequestOptions? options = null,
CancellationToken cancellationToken = default
Expand Down
Loading
Loading