diff --git a/reference.md b/reference.md index c56538697..65a207820 100644 --- a/reference.md +++ b/reference.md @@ -1805,6 +1805,7 @@ await client.Connections.ListAsync( { From = "from", Take = 1, + Strategy = [new List() { ConnectionStrategyEnum.Ad }], Name = "name", Fields = "fields", IncludeFields = true, @@ -3404,6 +3405,13 @@ await client.Flows.ListAsync( Page = 1, PerPage = 1, IncludeTotals = true, + Hydrate = + [ + new List() + { + ListFlowsRequestParametersHydrateEnum.FormCount, + }, + ], Synchronous = true, } ); @@ -3486,7 +3494,19 @@ await client.Flows.CreateAsync(new CreateFlowRequestContent { Name = "name" });
```csharp -await client.Flows.GetAsync("id", new GetFlowRequestParameters()); +await client.Flows.GetAsync( + "id", + new GetFlowRequestParameters + { + Hydrate = + [ + new List() + { + GetFlowRequestParametersHydrateEnum.FormCount, + }, + ], + } +); ```
@@ -3629,6 +3649,13 @@ await client.Forms.ListAsync( Page = 1, PerPage = 1, IncludeTotals = true, + Hydrate = + [ + new List() + { + FormsRequestParametersHydrateEnum.FlowCount, + }, + ], } ); ``` @@ -3710,7 +3737,19 @@ await client.Forms.CreateAsync(new CreateFormRequestContent { Name = "name" });
```csharp -await client.Forms.GetAsync("id", new GetFormRequestParameters()); +await client.Forms.GetAsync( + "id", + new GetFormRequestParameters + { + Hydrate = + [ + new List() + { + FormsRequestParametersHydrateEnum.FlowCount, + }, + ], + } +); ```
@@ -4042,6 +4081,7 @@ await client.Groups.ListAsync( ConnectionId = "connection_id", Name = "name", ExternalId = "external_id", + Search = "search", Fields = "fields", IncludeFields = true, From = "from", @@ -6540,6 +6580,7 @@ Retrieve details of all APIs associated with your tenant. await client.ResourceServers.ListAsync( new ListResourceServerRequestParameters { + Identifiers = [new List() { "identifiers" }], Page = 1, PerPage = 1, IncludeTotals = true, @@ -8755,7 +8796,7 @@ await client.UserAttributeProfiles.ListAsync(
-Retrieve details about a single User Attribute Profile specified by ID. +Create a User Attribute Profile
@@ -13122,6 +13163,7 @@ await client.Clients.Connections.GetAsync( "id", new ConnectionsGetRequest { + Strategy = [new List() { ConnectionStrategyEnum.Ad }], From = "from", Take = 1, Fields = "fields", @@ -15174,7 +15216,16 @@ await client.Flows.Executions.ListAsync( await client.Flows.Executions.GetAsync( "flow_id", "execution_id", - new GetFlowExecutionRequestParameters() + new GetFlowExecutionRequestParameters + { + Hydrate = + [ + new List() + { + GetFlowExecutionRequestParametersHydrateEnum.Debug, + }, + ], + } ); ``` @@ -18607,6 +18658,7 @@ await client.Organizations.ClientGrants.ListAsync( { Audience = "audience", ClientId = "client_id", + GrantIds = [new List() { "grant_ids" }], Page = 1, PerPage = 1, IncludeTotals = true, @@ -23904,7 +23956,7 @@ await client.Users.Sessions.DeleteAsync("user_id");
-List a verifiable credential templates. +List verifiable credential templates.
diff --git a/src/Auth0.ManagementApi/Actions/ActionsClient.cs b/src/Auth0.ManagementApi/Actions/ActionsClient.cs index d3fadd131..ae76d3ac3 100644 --- a/src/Auth0.ManagementApi/Actions/ActionsClient.cs +++ b/src/Auth0.ManagementApi/Actions/ActionsClient.cs @@ -620,7 +620,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Actions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Actions/Modules/ModulesClient.cs b/src/Auth0.ManagementApi/Actions/Modules/ModulesClient.cs index 2466bed81..3342728fa 100644 --- a/src/Auth0.ManagementApi/Actions/Modules/ModulesClient.cs +++ b/src/Auth0.ManagementApi/Actions/Modules/ModulesClient.cs @@ -637,7 +637,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Modules?.ToList(), null, cancellationToken @@ -809,7 +809,7 @@ await ListActionsInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Actions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Actions/Modules/Versions/VersionsClient.cs b/src/Auth0.ManagementApi/Actions/Modules/Versions/VersionsClient.cs index 26ea8dc10..e83d16d4c 100644 --- a/src/Auth0.ManagementApi/Actions/Modules/Versions/VersionsClient.cs +++ b/src/Auth0.ManagementApi/Actions/Modules/Versions/VersionsClient.cs @@ -349,7 +349,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Versions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Actions/Triggers/Bindings/BindingsClient.cs b/src/Auth0.ManagementApi/Actions/Triggers/Bindings/BindingsClient.cs index 265825167..c749a379e 100644 --- a/src/Auth0.ManagementApi/Actions/Triggers/Bindings/BindingsClient.cs +++ b/src/Auth0.ManagementApi/Actions/Triggers/Bindings/BindingsClient.cs @@ -253,7 +253,7 @@ await ListInternalAsync(triggerId, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Bindings?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Actions/Versions/VersionsClient.cs b/src/Auth0.ManagementApi/Actions/Versions/VersionsClient.cs index 7fafdbe90..a129459fa 100644 --- a/src/Auth0.ManagementApi/Actions/Versions/VersionsClient.cs +++ b/src/Auth0.ManagementApi/Actions/Versions/VersionsClient.cs @@ -347,7 +347,7 @@ await ListInternalAsync(actionId, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Versions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/ClientGrants/Requests/ListClientGrantsRequestParameters.cs b/src/Auth0.ManagementApi/ClientGrants/Requests/ListClientGrantsRequestParameters.cs index d60e93160..422de5a8a 100644 --- a/src/Auth0.ManagementApi/ClientGrants/Requests/ListClientGrantsRequestParameters.cs +++ b/src/Auth0.ManagementApi/ClientGrants/Requests/ListClientGrantsRequestParameters.cs @@ -43,7 +43,7 @@ public record ListClientGrantsRequestParameters public Optional SubjectType { get; set; } /// - /// Applies this client grant as the default for all clients in the specified group. The only accepted value is `third_party_clients`, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with `client_id`. + /// Applies this client grant as the default for all clients in the specified group. The only accepted value is `third_party_clients`, which applies the grant to all third-party clients. Per-client grants for the same audience take precedence. Mutually exclusive with `client_id`. /// [JsonIgnore] public Optional DefaultFor { get; set; } diff --git a/src/Auth0.ManagementApi/Clients/ClientsClient.cs b/src/Auth0.ManagementApi/Clients/ClientsClient.cs index 738de61d4..98298766f 100644 --- a/src/Auth0.ManagementApi/Clients/ClientsClient.cs +++ b/src/Auth0.ManagementApi/Clients/ClientsClient.cs @@ -801,7 +801,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Clients?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Clients/Connections/ConnectionsClient.cs b/src/Auth0.ManagementApi/Clients/Connections/ConnectionsClient.cs index 84b3c23aa..9003d648e 100644 --- a/src/Auth0.ManagementApi/Clients/Connections/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Clients/Connections/ConnectionsClient.cs @@ -155,6 +155,7 @@ private async Task> GetInt /// "id", /// new ConnectionsGetRequest /// { + /// Strategy = [new List<ConnectionStrategyEnum?>() { ConnectionStrategyEnum.Ad }], /// From = "from", /// Take = 1, /// Fields = "fields", diff --git a/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs b/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs index 9dfc126da..cfbfcebe7 100644 --- a/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Connections/ConnectionsClient.cs @@ -466,6 +466,7 @@ private async Task> UpdateAsync /// { /// From = "from", /// Take = 1, + /// Strategy = [new List<ConnectionStrategyEnum?>() { ConnectionStrategyEnum.Ad }], /// Name = "name", /// Fields = "fields", /// IncludeFields = true, diff --git a/src/Auth0.ManagementApi/DeviceCredentials/DeviceCredentialsClient.cs b/src/Auth0.ManagementApi/DeviceCredentials/DeviceCredentialsClient.cs index b54544ac9..913c34fbe 100644 --- a/src/Auth0.ManagementApi/DeviceCredentials/DeviceCredentialsClient.cs +++ b/src/Auth0.ManagementApi/DeviceCredentials/DeviceCredentialsClient.cs @@ -267,7 +267,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.DeviceCredentials?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Flows/Executions/ExecutionsClient.cs b/src/Auth0.ManagementApi/Flows/Executions/ExecutionsClient.cs index c151fb840..1c4c6102c 100644 --- a/src/Auth0.ManagementApi/Flows/Executions/ExecutionsClient.cs +++ b/src/Auth0.ManagementApi/Flows/Executions/ExecutionsClient.cs @@ -265,7 +265,16 @@ await ListInternalAsync(flowId, request, options, cancellationToken) /// await client.Flows.Executions.GetAsync( /// "flow_id", /// "execution_id", - /// new GetFlowExecutionRequestParameters() + /// new GetFlowExecutionRequestParameters + /// { + /// Hydrate = + /// [ + /// new List<GetFlowExecutionRequestParametersHydrateEnum?>() + /// { + /// GetFlowExecutionRequestParametersHydrateEnum.Debug, + /// }, + /// ], + /// } /// ); /// public WithRawResponseTask GetAsync( diff --git a/src/Auth0.ManagementApi/Flows/FlowsClient.cs b/src/Auth0.ManagementApi/Flows/FlowsClient.cs index 4fdeac550..020572a62 100644 --- a/src/Auth0.ManagementApi/Flows/FlowsClient.cs +++ b/src/Auth0.ManagementApi/Flows/FlowsClient.cs @@ -398,6 +398,13 @@ private async Task> UpdateAsyncCore( /// Page = 1, /// PerPage = 1, /// IncludeTotals = true, + /// Hydrate = + /// [ + /// new List<ListFlowsRequestParametersHydrateEnum?>() + /// { + /// ListFlowsRequestParametersHydrateEnum.FormCount, + /// }, + /// ], /// Synchronous = true, /// } /// ); @@ -427,7 +434,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Flows?.ToList(), null, cancellationToken @@ -451,7 +458,19 @@ public WithRawResponseTask CreateAsync( } /// - /// await client.Flows.GetAsync("id", new GetFlowRequestParameters()); + /// await client.Flows.GetAsync( + /// "id", + /// new GetFlowRequestParameters + /// { + /// Hydrate = + /// [ + /// new List<GetFlowRequestParametersHydrateEnum?>() + /// { + /// GetFlowRequestParametersHydrateEnum.FormCount, + /// }, + /// ], + /// } + /// ); /// public WithRawResponseTask GetAsync( string id, diff --git a/src/Auth0.ManagementApi/Flows/Vault/Connections/ConnectionsClient.cs b/src/Auth0.ManagementApi/Flows/Vault/Connections/ConnectionsClient.cs index e9fbb9336..82883acfe 100644 --- a/src/Auth0.ManagementApi/Flows/Vault/Connections/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Flows/Vault/Connections/ConnectionsClient.cs @@ -427,7 +427,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Connections?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Forms/FormsClient.cs b/src/Auth0.ManagementApi/Forms/FormsClient.cs index 2165397ce..b48f0ecaf 100644 --- a/src/Auth0.ManagementApi/Forms/FormsClient.cs +++ b/src/Auth0.ManagementApi/Forms/FormsClient.cs @@ -388,6 +388,13 @@ private async Task> UpdateAsyncCore( /// Page = 1, /// PerPage = 1, /// IncludeTotals = true, + /// Hydrate = + /// [ + /// new List<FormsRequestParametersHydrateEnum?>() + /// { + /// FormsRequestParametersHydrateEnum.FlowCount, + /// }, + /// ], /// } /// ); /// @@ -416,7 +423,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Forms?.ToList(), null, cancellationToken @@ -440,7 +447,19 @@ public WithRawResponseTask CreateAsync( } /// - /// await client.Forms.GetAsync("id", new GetFormRequestParameters()); + /// await client.Forms.GetAsync( + /// "id", + /// new GetFormRequestParameters + /// { + /// Hydrate = + /// [ + /// new List<FormsRequestParametersHydrateEnum?>() + /// { + /// FormsRequestParametersHydrateEnum.FlowCount, + /// }, + /// ], + /// } + /// ); /// public WithRawResponseTask GetAsync( string id, diff --git a/src/Auth0.ManagementApi/Groups/GroupsClient.cs b/src/Auth0.ManagementApi/Groups/GroupsClient.cs index 8bf67a853..aaeb7a58d 100644 --- a/src/Auth0.ManagementApi/Groups/GroupsClient.cs +++ b/src/Auth0.ManagementApi/Groups/GroupsClient.cs @@ -35,13 +35,14 @@ private async Task> ListInte CancellationToken cancellationToken = default ) { - var _queryString = new Auth0.ManagementApi.Core.QueryStringBuilder.Builder(capacity: 7) + var _queryString = new Auth0.ManagementApi.Core.QueryStringBuilder.Builder(capacity: 8) .Add( "connection_id", request.ConnectionId.IsDefined ? request.ConnectionId.Value : null ) .Add("name", request.Name.IsDefined ? request.Name.Value : null) .Add("external_id", request.ExternalId.IsDefined ? request.ExternalId.Value : null) + .Add("search", request.Search.IsDefined ? request.Search.Value : null) .Add("fields", request.Fields.IsDefined ? request.Fields.Value : null) .Add( "include_fields", @@ -226,6 +227,7 @@ private async Task> GetAsyncCore( /// ConnectionId = "connection_id", /// Name = "name", /// ExternalId = "external_id", + /// Search = "search", /// Fields = "fields", /// IncludeFields = true, /// From = "from", diff --git a/src/Auth0.ManagementApi/Groups/Requests/ListGroupsRequestParameters.cs b/src/Auth0.ManagementApi/Groups/Requests/ListGroupsRequestParameters.cs index ff6afbd82..512a43575 100644 --- a/src/Auth0.ManagementApi/Groups/Requests/ListGroupsRequestParameters.cs +++ b/src/Auth0.ManagementApi/Groups/Requests/ListGroupsRequestParameters.cs @@ -24,6 +24,12 @@ public record ListGroupsRequestParameters [JsonIgnore] public Optional ExternalId { get; set; } + /// + /// Search for groups by name or external ID. + /// + [JsonIgnore] + public Optional Search { get; set; } + /// /// A comma separated list of fields to include or exclude (depending on include_fields) from the result, empty to retrieve all fields /// diff --git a/src/Auth0.ManagementApi/Hooks/HooksClient.cs b/src/Auth0.ManagementApi/Hooks/HooksClient.cs index 47a394839..8d6171437 100644 --- a/src/Auth0.ManagementApi/Hooks/HooksClient.cs +++ b/src/Auth0.ManagementApi/Hooks/HooksClient.cs @@ -441,7 +441,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Hooks?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Keys/Encryption/EncryptionClient.cs b/src/Auth0.ManagementApi/Keys/Encryption/EncryptionClient.cs index 53268fd99..b11a9de1d 100644 --- a/src/Auth0.ManagementApi/Keys/Encryption/EncryptionClient.cs +++ b/src/Auth0.ManagementApi/Keys/Encryption/EncryptionClient.cs @@ -528,7 +528,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Keys?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Logs/LogsClient.cs b/src/Auth0.ManagementApi/Logs/LogsClient.cs index e0d140ef1..4cacc496a 100644 --- a/src/Auth0.ManagementApi/Logs/LogsClient.cs +++ b/src/Auth0.ManagementApi/Logs/LogsClient.cs @@ -313,7 +313,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Logs?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/NetworkAcls/NetworkAclsClient.cs b/src/Auth0.ManagementApi/NetworkAcls/NetworkAclsClient.cs index a9d445bcd..b9334af37 100644 --- a/src/Auth0.ManagementApi/NetworkAcls/NetworkAclsClient.cs +++ b/src/Auth0.ManagementApi/NetworkAcls/NetworkAclsClient.cs @@ -436,7 +436,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.NetworkAcls?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Organizations/ClientGrants/ClientGrantsClient.cs b/src/Auth0.ManagementApi/Organizations/ClientGrants/ClientGrantsClient.cs index 9e6219e95..3cc356802 100644 --- a/src/Auth0.ManagementApi/Organizations/ClientGrants/ClientGrantsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/ClientGrants/ClientGrantsClient.cs @@ -235,6 +235,7 @@ private async Task< /// { /// Audience = "audience", /// ClientId = "client_id", + /// GrantIds = [new List<string?>() { "grant_ids" }], /// Page = 1, /// PerPage = 1, /// IncludeTotals = true, @@ -268,7 +269,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.ClientGrants?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Organizations/Connections/ConnectionsClient.cs b/src/Auth0.ManagementApi/Organizations/Connections/ConnectionsClient.cs index b848aeba2..c3d262574 100644 --- a/src/Auth0.ManagementApi/Organizations/Connections/ConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Connections/ConnectionsClient.cs @@ -450,7 +450,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Connections?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Organizations/EnabledConnections/EnabledConnectionsClient.cs b/src/Auth0.ManagementApi/Organizations/EnabledConnections/EnabledConnectionsClient.cs index 8cf28292f..4455b9263 100644 --- a/src/Auth0.ManagementApi/Organizations/EnabledConnections/EnabledConnectionsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/EnabledConnections/EnabledConnectionsClient.cs @@ -446,7 +446,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.EnabledConnections?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Organizations/Invitations/InvitationsClient.cs b/src/Auth0.ManagementApi/Organizations/Invitations/InvitationsClient.cs index 483dfe5cf..06e74dadc 100644 --- a/src/Auth0.ManagementApi/Organizations/Invitations/InvitationsClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Invitations/InvitationsClient.cs @@ -380,7 +380,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Invitations?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Organizations/Members/Roles/RolesClient.cs b/src/Auth0.ManagementApi/Organizations/Members/Roles/RolesClient.cs index bea5965db..b83f2f553 100644 --- a/src/Auth0.ManagementApi/Organizations/Members/Roles/RolesClient.cs +++ b/src/Auth0.ManagementApi/Organizations/Members/Roles/RolesClient.cs @@ -180,7 +180,7 @@ await ListInternalAsync(id, userId, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Roles?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs b/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs index 5a3a3a4c8..15dad4607 100644 --- a/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs +++ b/src/Auth0.ManagementApi/Prompts/Rendering/RenderingClient.cs @@ -454,7 +454,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Configs?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs b/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs index 6455f86d8..ac9934265 100644 --- a/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs +++ b/src/Auth0.ManagementApi/RefreshTokens/RefreshTokensClient.cs @@ -194,6 +194,8 @@ private async Task> GetAsyncCore { switch (response.StatusCode) { + case 400: + throw new BadRequestError(JsonUtils.Deserialize(responseBody)); case 401: throw new UnauthorizedError(JsonUtils.Deserialize(responseBody)); case 403: diff --git a/src/Auth0.ManagementApi/ResourceServers/ResourceServersClient.cs b/src/Auth0.ManagementApi/ResourceServers/ResourceServersClient.cs index 1442c0a77..95d637391 100644 --- a/src/Auth0.ManagementApi/ResourceServers/ResourceServersClient.cs +++ b/src/Auth0.ManagementApi/ResourceServers/ResourceServersClient.cs @@ -417,6 +417,7 @@ private async Task> UpdateA /// await client.ResourceServers.ListAsync( /// new ListResourceServerRequestParameters /// { + /// Identifiers = [new List<string?>() { "identifiers" }], /// Page = 1, /// PerPage = 1, /// IncludeTotals = true, @@ -449,7 +450,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.ResourceServers?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Roles/Permissions/PermissionsClient.cs b/src/Auth0.ManagementApi/Roles/Permissions/PermissionsClient.cs index e1ab3dd40..a6bbaf6bc 100644 --- a/src/Auth0.ManagementApi/Roles/Permissions/PermissionsClient.cs +++ b/src/Auth0.ManagementApi/Roles/Permissions/PermissionsClient.cs @@ -173,7 +173,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Permissions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Roles/RolesClient.cs b/src/Auth0.ManagementApi/Roles/RolesClient.cs index ef50c4c8e..7960926df 100644 --- a/src/Auth0.ManagementApi/Roles/RolesClient.cs +++ b/src/Auth0.ManagementApi/Roles/RolesClient.cs @@ -431,7 +431,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Roles?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Rules/RulesClient.cs b/src/Auth0.ManagementApi/Rules/RulesClient.cs index 52cda25c0..9c1b6a76e 100644 --- a/src/Auth0.ManagementApi/Rules/RulesClient.cs +++ b/src/Auth0.ManagementApi/Rules/RulesClient.cs @@ -444,7 +444,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Rules?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/SelfServiceProfiles/SelfServiceProfilesClient.cs b/src/Auth0.ManagementApi/SelfServiceProfiles/SelfServiceProfilesClient.cs index 938be6060..e216a058c 100644 --- a/src/Auth0.ManagementApi/SelfServiceProfiles/SelfServiceProfilesClient.cs +++ b/src/Auth0.ManagementApi/SelfServiceProfiles/SelfServiceProfilesClient.cs @@ -447,7 +447,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.SelfServiceProfiles?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs b/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs index f6b59dcaa..402acac25 100644 --- a/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs +++ b/src/Auth0.ManagementApi/Types/ConnectionOptionsCommonOidc.cs @@ -88,6 +88,10 @@ public record ConnectionOptionsCommonOidc : IJsonOnDeserialized, IJsonOnSerializ [JsonPropertyName("token_endpoint_auth_signing_alg")] public Optional TokenEndpointAuthSigningAlg { get; set; } + [Optional] + [JsonPropertyName("token_endpoint_jwtca_aud_format")] + public ConnectionTokenEndpointJwtcaAudFormatEnumOidc? TokenEndpointJwtcaAudFormat { get; set; } + [Nullable, Optional] [JsonPropertyName("upstream_params")] public Optional TokenEndpointAuthSigningAlg { get; set; } + [Optional] + [JsonPropertyName("token_endpoint_jwtca_aud_format")] + public ConnectionTokenEndpointJwtcaAudFormatEnumOidc? TokenEndpointJwtcaAudFormat { get; set; } + [Nullable, Optional] [JsonPropertyName("upstream_params")] public Optional TokenEndpointAuthSigningAlg { get; set; } + [Optional] + [JsonPropertyName("token_endpoint_jwtca_aud_format")] + public ConnectionTokenEndpointJwtcaAudFormatEnumOidc? TokenEndpointJwtcaAudFormat { get; set; } + [Nullable, Optional] [JsonPropertyName("upstream_params")] public Optional + /// The string value of the enum. + /// + public string Value { get; } + + /// + /// Create a string enum with the given value. + /// + public static ConnectionTokenEndpointJwtcaAudFormatEnumOidc FromCustom(string value) + { + return new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(value); + } + + public bool Equals(string? other) + { + return Value.Equals(other); + } + + /// + /// Returns the string value of the enum. + /// + public override string ToString() + { + return Value; + } + + public static bool operator ==( + ConnectionTokenEndpointJwtcaAudFormatEnumOidc value1, + string value2 + ) => value1.Value.Equals(value2); + + public static bool operator !=( + ConnectionTokenEndpointJwtcaAudFormatEnumOidc value1, + string value2 + ) => !value1.Value.Equals(value2); + + public static explicit operator string(ConnectionTokenEndpointJwtcaAudFormatEnumOidc value) => + value.Value; + + public static explicit operator ConnectionTokenEndpointJwtcaAudFormatEnumOidc(string value) => + new(value); + + internal class ConnectionTokenEndpointJwtcaAudFormatEnumOidcSerializer + : JsonConverter + { + public override ConnectionTokenEndpointJwtcaAudFormatEnumOidc Read( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON value could not be read as a string." + ); + return new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(stringValue); + } + + public override void Write( + Utf8JsonWriter writer, + ConnectionTokenEndpointJwtcaAudFormatEnumOidc value, + JsonSerializerOptions options + ) + { + writer.WriteStringValue(value.Value); + } + + public override ConnectionTokenEndpointJwtcaAudFormatEnumOidc ReadAsPropertyName( + ref Utf8JsonReader reader, + Type typeToConvert, + JsonSerializerOptions options + ) + { + var stringValue = + reader.GetString() + ?? throw new global::System.Exception( + "The JSON property name could not be read as a string." + ); + return new ConnectionTokenEndpointJwtcaAudFormatEnumOidc(stringValue); + } + + public override void WriteAsPropertyName( + Utf8JsonWriter writer, + ConnectionTokenEndpointJwtcaAudFormatEnumOidc value, + JsonSerializerOptions options + ) + { + writer.WritePropertyName(value.Value); + } + } + + /// + /// Constant strings for enum values + /// + [Serializable] + public static class Values + { + public const string Issuer = "issuer"; + + public const string TokenEndpoint = "token_endpoint"; + } +} diff --git a/src/Auth0.ManagementApi/Types/CreateEmailProviderResponseContent.cs b/src/Auth0.ManagementApi/Types/CreateEmailProviderResponseContent.cs index 06e913e50..2a5d8cd2e 100644 --- a/src/Auth0.ManagementApi/Types/CreateEmailProviderResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/CreateEmailProviderResponseContent.cs @@ -12,7 +12,7 @@ public record CreateEmailProviderResponseContent : IJsonOnDeserialized new Dictionary(); /// - /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. + /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `resend`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. /// [Optional] [JsonPropertyName("name")] diff --git a/src/Auth0.ManagementApi/Types/EmailProviderNameEnum.cs b/src/Auth0.ManagementApi/Types/EmailProviderNameEnum.cs index 3c4eb4367..cf115b57c 100644 --- a/src/Auth0.ManagementApi/Types/EmailProviderNameEnum.cs +++ b/src/Auth0.ManagementApi/Types/EmailProviderNameEnum.cs @@ -14,6 +14,8 @@ namespace Auth0.ManagementApi; public static readonly EmailProviderNameEnum Sendgrid = new(Values.Sendgrid); + public static readonly EmailProviderNameEnum Resend = new(Values.Resend); + public static readonly EmailProviderNameEnum Ses = new(Values.Ses); public static readonly EmailProviderNameEnum Sparkpost = new(Values.Sparkpost); @@ -128,6 +130,8 @@ public static class Values public const string Sendgrid = "sendgrid"; + public const string Resend = "resend"; + public const string Ses = "ses"; public const string Sparkpost = "sparkpost"; diff --git a/src/Auth0.ManagementApi/Types/GetEmailProviderResponseContent.cs b/src/Auth0.ManagementApi/Types/GetEmailProviderResponseContent.cs index 8a871e0cb..dc7aa0107 100644 --- a/src/Auth0.ManagementApi/Types/GetEmailProviderResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/GetEmailProviderResponseContent.cs @@ -12,7 +12,7 @@ public record GetEmailProviderResponseContent : IJsonOnDeserialized new Dictionary(); /// - /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. + /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `resend`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. /// [Optional] [JsonPropertyName("name")] diff --git a/src/Auth0.ManagementApi/Types/UpdateEmailProviderResponseContent.cs b/src/Auth0.ManagementApi/Types/UpdateEmailProviderResponseContent.cs index 7440e4c9d..1f9f19fc6 100644 --- a/src/Auth0.ManagementApi/Types/UpdateEmailProviderResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/UpdateEmailProviderResponseContent.cs @@ -12,7 +12,7 @@ public record UpdateEmailProviderResponseContent : IJsonOnDeserialized new Dictionary(); /// - /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. + /// Name of the email provider. Can be `mailgun`, `mandrill`, `sendgrid`, `resend`, `ses`, `sparkpost`, `smtp`, `azure_cs`, `ms365`, or `custom`. /// [Optional] [JsonPropertyName("name")] diff --git a/src/Auth0.ManagementApi/Types/UpdateUserAuthenticationMethodResponseContent.cs b/src/Auth0.ManagementApi/Types/UpdateUserAuthenticationMethodResponseContent.cs index d3fbb29b6..5c1ee61ae 100644 --- a/src/Auth0.ManagementApi/Types/UpdateUserAuthenticationMethodResponseContent.cs +++ b/src/Auth0.ManagementApi/Types/UpdateUserAuthenticationMethodResponseContent.cs @@ -88,6 +88,13 @@ public record UpdateUserAuthenticationMethodResponseContent : IJsonOnDeserialize [JsonPropertyName("relying_party_identifier")] public string? RelyingPartyIdentifier { get; set; } + /// + /// Whether the authentication method has been confirmed. + /// + [Optional] + [JsonPropertyName("confirmed")] + public bool? Confirmed { get; set; } + /// /// Authentication method creation date /// diff --git a/src/Auth0.ManagementApi/UserAttributeProfiles/IUserAttributeProfilesClient.cs b/src/Auth0.ManagementApi/UserAttributeProfiles/IUserAttributeProfilesClient.cs index b2c202ae1..989cdf23c 100644 --- a/src/Auth0.ManagementApi/UserAttributeProfiles/IUserAttributeProfilesClient.cs +++ b/src/Auth0.ManagementApi/UserAttributeProfiles/IUserAttributeProfilesClient.cs @@ -14,7 +14,7 @@ Task> ListAsync( ); /// - /// Retrieve details about a single User Attribute Profile specified by ID. + /// Create a User Attribute Profile /// WithRawResponseTask CreateAsync( CreateUserAttributeProfileRequestContent request, diff --git a/src/Auth0.ManagementApi/UserAttributeProfiles/UserAttributeProfilesClient.cs b/src/Auth0.ManagementApi/UserAttributeProfiles/UserAttributeProfilesClient.cs index 91c61ee3b..2a4b16b97 100644 --- a/src/Auth0.ManagementApi/UserAttributeProfiles/UserAttributeProfilesClient.cs +++ b/src/Auth0.ManagementApi/UserAttributeProfiles/UserAttributeProfilesClient.cs @@ -607,7 +607,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), } /// - /// Retrieve details about a single User Attribute Profile specified by ID. + /// Create a User Attribute Profile /// /// /// await client.UserAttributeProfiles.CreateAsync( diff --git a/src/Auth0.ManagementApi/UserGrants/UserGrantsClient.cs b/src/Auth0.ManagementApi/UserGrants/UserGrantsClient.cs index 317164f1b..97879b6ad 100644 --- a/src/Auth0.ManagementApi/UserGrants/UserGrantsClient.cs +++ b/src/Auth0.ManagementApi/UserGrants/UserGrantsClient.cs @@ -166,7 +166,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Grants?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/AuthenticationMethods/AuthenticationMethodsClient.cs b/src/Auth0.ManagementApi/Users/AuthenticationMethods/AuthenticationMethodsClient.cs index 60c2557d2..62a675476 100644 --- a/src/Auth0.ManagementApi/Users/AuthenticationMethods/AuthenticationMethodsClient.cs +++ b/src/Auth0.ManagementApi/Users/AuthenticationMethods/AuthenticationMethodsClient.cs @@ -559,7 +559,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Authenticators?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/Logs/LogsClient.cs b/src/Auth0.ManagementApi/Users/Logs/LogsClient.cs index 83ca9bf4d..40450fafa 100644 --- a/src/Auth0.ManagementApi/Users/Logs/LogsClient.cs +++ b/src/Auth0.ManagementApi/Users/Logs/LogsClient.cs @@ -181,7 +181,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Logs?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/Organizations/OrganizationsClient.cs b/src/Auth0.ManagementApi/Users/Organizations/OrganizationsClient.cs index 8cbba0c75..45dda0f2d 100644 --- a/src/Auth0.ManagementApi/Users/Organizations/OrganizationsClient.cs +++ b/src/Auth0.ManagementApi/Users/Organizations/OrganizationsClient.cs @@ -169,7 +169,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Organizations?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/Permissions/PermissionsClient.cs b/src/Auth0.ManagementApi/Users/Permissions/PermissionsClient.cs index 23e3694a2..78d466830 100644 --- a/src/Auth0.ManagementApi/Users/Permissions/PermissionsClient.cs +++ b/src/Auth0.ManagementApi/Users/Permissions/PermissionsClient.cs @@ -173,7 +173,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Permissions?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/Roles/RolesClient.cs b/src/Auth0.ManagementApi/Users/Roles/RolesClient.cs index 8c65bf47d..bd8745a15 100644 --- a/src/Auth0.ManagementApi/Users/Roles/RolesClient.cs +++ b/src/Auth0.ManagementApi/Users/Roles/RolesClient.cs @@ -170,7 +170,7 @@ await ListInternalAsync(id, request, options, cancellationToken) { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Roles?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/Users/UsersClient.cs b/src/Auth0.ManagementApi/Users/UsersClient.cs index 9e3b89b3b..6dedcf975 100644 --- a/src/Auth0.ManagementApi/Users/UsersClient.cs +++ b/src/Auth0.ManagementApi/Users/UsersClient.cs @@ -716,7 +716,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(), { request.Page = offset; }, - request => request.PerPage.GetValueOrDefault(0), + null, response => response.Users?.ToList(), null, cancellationToken diff --git a/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/ITemplatesClient.cs b/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/ITemplatesClient.cs index 638340455..83cf4362b 100644 --- a/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/ITemplatesClient.cs +++ b/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/ITemplatesClient.cs @@ -6,7 +6,7 @@ namespace Auth0.ManagementApi.VerifiableCredentials.Verification; public partial interface ITemplatesClient { /// - /// List a verifiable credential templates. + /// List verifiable credential templates. /// Task> ListAsync( ListVerifiableCredentialTemplatesRequestParameters request, diff --git a/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/TemplatesClient.cs b/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/TemplatesClient.cs index fbf414ce4..fa33c0c6e 100644 --- a/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/TemplatesClient.cs +++ b/src/Auth0.ManagementApi/VerifiableCredentials/Verification/Templates/TemplatesClient.cs @@ -14,7 +14,7 @@ internal TemplatesClient(RawClient client) } /// - /// List a verifiable credential templates. + /// List verifiable credential templates. /// private WithRawResponseTask ListInternalAsync( ListVerifiableCredentialTemplatesRequestParameters request, @@ -403,7 +403,7 @@ private async Task< } /// - /// List a verifiable credential templates. + /// List verifiable credential templates. /// /// /// await client.VerifiableCredentials.Verification.Templates.ListAsync( diff --git a/tests/Auth0.AuthenticationApi.IntegrationTests/Auth0.AuthenticationApi.IntegrationTests.csproj b/tests/Auth0.AuthenticationApi.IntegrationTests/Auth0.AuthenticationApi.IntegrationTests.csproj index 39476fc3b..3f489f3b5 100644 --- a/tests/Auth0.AuthenticationApi.IntegrationTests/Auth0.AuthenticationApi.IntegrationTests.csproj +++ b/tests/Auth0.AuthenticationApi.IntegrationTests/Auth0.AuthenticationApi.IntegrationTests.csproj @@ -38,6 +38,9 @@ PreserveNewest + + PreserveNewest + diff --git a/tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs b/tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs index e2042f187..ace234457 100644 --- a/tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs +++ b/tests/Auth0.ManagementApi.IntegrationTests/UsersTests.cs @@ -242,12 +242,21 @@ public async Task Test_paging_includes_totals() var usersPager = await fixture.ApiClient.Users.ListAsync(new ListUsersRequestParameters { Page = 0, - PerPage = 50, + PerPage = 25, IncludeTotals = true }); - // Assert - usersPager.CurrentPage.Items.Should().NotBeNull(); + // Assert- totals are reported on the first page + var firstPageResponse = (ListUsersOffsetPaginatedResponseContent)usersPager.CurrentPage.Response; + firstPageResponse.Should().NotBeNull(); + firstPageResponse?.Total.Should().BeGreaterThan(0); + await foreach (var page in usersPager.AsPagesAsync()) + { + foreach (var user in page) + { + user.UserId.Should().NotBeNullOrEmpty(); + } + } } [Fact] diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/Connections/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/Connections/GetTest.cs index b37dac79f..2489e3d38 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/Connections/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Clients/Connections/GetTest.cs @@ -1,3 +1,4 @@ +using Auth0.ManagementApi; using Auth0.ManagementApi.Clients; using Auth0.ManagementApi.Test.Unit.MockServer; using NUnit.Framework; @@ -60,6 +61,7 @@ public async Task MockServerTest() "id", new ConnectionsGetRequest { + Strategy = new List() { ConnectionStrategyEnum.Ad }, From = "from", Take = 1, Fields = "fields", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Connections/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Connections/ListTest.cs index 9ed7dace7..3d7240a25 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Connections/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Connections/ListTest.cs @@ -62,6 +62,7 @@ public async Task MockServerTest() { From = "from", Take = 1, + Strategy = new List() { ConnectionStrategyEnum.Ad }, Name = "name", Fields = "fields", IncludeFields = true, diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/Executions/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/Executions/GetTest.cs index af9a55163..f3bf62577 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/Executions/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/Executions/GetTest.cs @@ -1,3 +1,4 @@ +using Auth0.ManagementApi; using Auth0.ManagementApi.Flows; using Auth0.ManagementApi.Test.Unit.MockServer; using Auth0.ManagementApi.Test.Utils; @@ -45,7 +46,14 @@ public async Task MockServerTest() var response = await Client.Flows.Executions.GetAsync( "flow_id", "execution_id", - new GetFlowExecutionRequestParameters() + new GetFlowExecutionRequestParameters + { + Hydrate = + new List() + { + GetFlowExecutionRequestParametersHydrateEnum.Debug, + }, + } ); JsonAssert.AreEqual(response, mockResponse); } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/GetTest.cs index dec6328c7..28499a582 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/GetTest.cs @@ -45,7 +45,17 @@ public async Task MockServerTest() .WithBody(mockResponse) ); - var response = await Client.Flows.GetAsync("id", new GetFlowRequestParameters()); + var response = await Client.Flows.GetAsync( + "id", + new GetFlowRequestParameters + { + Hydrate = + new List() + { + GetFlowRequestParametersHydrateEnum.FormCount, + }, + } + ); JsonAssert.AreEqual(response, mockResponse); } } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/ListTest.cs index 10dd71d79..15e68584b 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Flows/ListTest.cs @@ -12,21 +12,21 @@ public class ListTest : BaseMockServerTest public async Task MockServerTest() { const string mockResponse = """ - { - "start": 1.1, - "limit": 1.1, - "total": 1.1, - "flows": [ - { - "id": "id", - "name": "name", - "created_at": "2024-01-15T09:30:00.000Z", - "updated_at": "2024-01-15T09:30:00.000Z", - "executed_at": "executed_at" - } - ] - } - """; + { + "start": 1.1, + "limit": 1.1, + "total": 1.1, + "flows": [ + { + "id": "id", + "name": "name", + "created_at": "2024-01-15T09:30:00.000Z", + "updated_at": "2024-01-15T09:30:00.000Z", + "executed_at": "executed_at" + } + ] + } + """; Server .Given( @@ -50,6 +50,11 @@ public async Task MockServerTest() Page = 1, PerPage = 1, IncludeTotals = true, + Hydrate = + new List() + { + ListFlowsRequestParametersHydrateEnum.FormCount, + }, Synchronous = true, } ); @@ -59,4 +64,4 @@ public async Task MockServerTest() break; // Only check the first item } } -} +} \ No newline at end of file diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/GetTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/GetTest.cs index 48c0283aa..9b5ec1e81 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/GetTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/GetTest.cs @@ -92,7 +92,17 @@ public async Task MockServerTest() .WithBody(mockResponse) ); - var response = await Client.Forms.GetAsync("id", new GetFormRequestParameters()); + var response = await Client.Forms.GetAsync( + "id", + new GetFormRequestParameters + { + Hydrate = + new List() + { + FormsRequestParametersHydrateEnum.FlowCount, + }, + } + ); JsonAssert.AreEqual(response, mockResponse); } } diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/ListTest.cs index 20b3a64cf..8b92bc5ce 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Forms/ListTest.cs @@ -12,22 +12,22 @@ public class ListTest : BaseMockServerTest public async Task MockServerTest() { const string mockResponse = """ - { - "start": 1.1, - "limit": 1.1, - "total": 1.1, - "forms": [ - { - "id": "id", - "name": "name", - "created_at": "2024-01-15T09:30:00.000Z", - "updated_at": "2024-01-15T09:30:00.000Z", - "embedded_at": "embedded_at", - "submitted_at": "submitted_at" - } - ] - } - """; + { + "start": 1.1, + "limit": 1.1, + "total": 1.1, + "forms": [ + { + "id": "id", + "name": "name", + "created_at": "2024-01-15T09:30:00.000Z", + "updated_at": "2024-01-15T09:30:00.000Z", + "embedded_at": "embedded_at", + "submitted_at": "submitted_at" + } + ] + } + """; Server .Given( @@ -51,6 +51,11 @@ public async Task MockServerTest() Page = 1, PerPage = 1, IncludeTotals = true, + Hydrate = + new List() + { + FormsRequestParametersHydrateEnum.FlowCount, + } } ); await foreach (var item in items) @@ -59,4 +64,4 @@ public async Task MockServerTest() break; // Only check the first item } } -} +} \ No newline at end of file diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Groups/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Groups/ListTest.cs index f8ca3a782..82623d0cf 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Groups/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Groups/ListTest.cs @@ -39,6 +39,7 @@ public async Task MockServerTest() .WithParam("connection_id", "connection_id") .WithParam("name", "name") .WithParam("external_id", "external_id") + .WithParam("search", "search") .WithParam("fields", "fields") .WithParam("from", "from") .WithParam("take", "1") @@ -57,6 +58,7 @@ public async Task MockServerTest() ConnectionId = "connection_id", Name = "name", ExternalId = "external_id", + Search = "search", Fields = "fields", IncludeFields = true, From = "from", diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Organizations/ClientGrants/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Organizations/ClientGrants/ListTest.cs index ff86f8526..78b496827 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Organizations/ClientGrants/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Organizations/ClientGrants/ListTest.cs @@ -55,6 +55,7 @@ public async Task MockServerTest() { Audience = "audience", ClientId = "client_id", + GrantIds = new List() { "grant_ids" }, Page = 1, PerPage = 1, IncludeTotals = true, diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/ResourceServers/ListTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/ResourceServers/ListTest.cs index 00fe5b247..dde3c682c 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/ResourceServers/ListTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/ResourceServers/ListTest.cs @@ -73,6 +73,7 @@ public async Task MockServerTest() var items = await Client.ResourceServers.ListAsync( new ListResourceServerRequestParameters { + Identifiers = new List { "identifiers" }, Page = 1, PerPage = 1, IncludeTotals = true, diff --git a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Users/AuthenticationMethods/UpdateTest.cs b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Users/AuthenticationMethods/UpdateTest.cs index d914dc426..de2fe391f 100644 --- a/tests/Auth0.ManagementApi.Test/Unit/MockServer/Users/AuthenticationMethods/UpdateTest.cs +++ b/tests/Auth0.ManagementApi.Test/Unit/MockServer/Users/AuthenticationMethods/UpdateTest.cs @@ -35,6 +35,7 @@ public async Task MockServerTest() "public_key": "public_key", "aaguid": "aaguid", "relying_party_identifier": "relying_party_identifier", + "confirmed": true, "created_at": "2024-01-15T09:30:00.000Z" } """;