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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
420 changes: 418 additions & 2 deletions .fern/replay.lock

Large diffs are not rendered by default.

758 changes: 604 additions & 154 deletions reference.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ private async Task<WithRawResponse<DeployActionVersionResponseContent>> DeployAs
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,6 @@ private async Task<WithRawResponse<ResetPhoneTemplateResponseContent>> ResetAsyn
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ public async Task UpdateUniversalLoginAsync(
Path = "branding/templates/universal-login",
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,6 @@ public async Task UpdateAsync(
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,6 @@ private async Task<WithRawResponse<CreateDirectoryProvisioningResponseContent>>
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down Expand Up @@ -334,7 +333,6 @@ private async Task<WithRawResponse<UpdateDirectoryProvisioningResponseContent>>
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
2 changes: 0 additions & 2 deletions src/Auth0.ManagementApi/Connections/Keys/KeysClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ private async Task<
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down Expand Up @@ -222,7 +221,6 @@ private async Task<WithRawResponse<RotateConnectionsKeysResponseContent>> Rotate
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public partial interface IScimConfigurationClient
);

/// <summary>
/// Retrieves a scim configuration by its <c>connectionId</c>.
/// Retrieves a scim configuration by its `connectionId`.
/// </summary>
WithRawResponseTask<GetScimConfigurationResponseContent> GetAsync(
string id,
Expand All @@ -37,7 +37,7 @@ WithRawResponseTask<CreateScimConfigurationResponseContent> CreateAsync(
);

/// <summary>
/// Deletes a scim configuration by its <c>connectionId</c>.
/// Deletes a scim configuration by its `connectionId`.
/// </summary>
Task DeleteAsync(
string id,
Expand All @@ -46,7 +46,7 @@ Task DeleteAsync(
);

/// <summary>
/// Update a scim configuration by its <c>connectionId</c>.
/// Update a scim configuration by its `connectionId`.
/// </summary>
WithRawResponseTask<UpdateScimConfigurationResponseContent> UpdateAsync(
string id,
Expand All @@ -56,7 +56,7 @@ WithRawResponseTask<UpdateScimConfigurationResponseContent> UpdateAsync(
);

/// <summary>
/// Retrieves a scim configuration's default mapping by its <c>connectionId</c>.
/// Retrieves a scim configuration's default mapping by its `connectionId`.
/// </summary>
WithRawResponseTask<GetScimConfigurationDefaultMappingResponseContent> GetDefaultMappingAsync(
string id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,6 @@ private async Task<WithRawResponse<CreateScimConfigurationResponseContent>> Crea
),
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down Expand Up @@ -512,7 +511,7 @@ await ListInternalAsync(request, options, cancellationToken).WithRawResponse(),
}

/// <summary>
/// Retrieves a scim configuration by its <c>connectionId</c>.
/// Retrieves a scim configuration by its `connectionId`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.GetAsync("id");
Expand Down Expand Up @@ -550,7 +549,7 @@ public WithRawResponseTask<CreateScimConfigurationResponseContent> CreateAsync(
}

/// <summary>
/// Deletes a scim configuration by its <c>connectionId</c>.
/// Deletes a scim configuration by its `connectionId`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.DeleteAsync("id");
Expand Down Expand Up @@ -613,7 +612,7 @@ public async Task DeleteAsync(
}

/// <summary>
/// Update a scim configuration by its <c>connectionId</c>.
/// Update a scim configuration by its `connectionId`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.UpdateAsync(
Expand All @@ -638,7 +637,7 @@ public WithRawResponseTask<UpdateScimConfigurationResponseContent> UpdateAsync(
}

/// <summary>
/// Retrieves a scim configuration's default mapping by its <c>connectionId</c>.
/// Retrieves a scim configuration's default mapping by its `connectionId`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.GetDefaultMappingAsync("id");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Auth0.ManagementApi.Connections.ScimConfiguration;
public partial interface ITokensClient
{
/// <summary>
/// Retrieves all scim tokens by its connection <c>id</c>.
/// Retrieves all scim tokens by its connection `id`.
/// </summary>
WithRawResponseTask<IEnumerable<ScimTokenItem>> GetAsync(
string id,
Expand All @@ -24,7 +24,7 @@ WithRawResponseTask<CreateScimTokenResponseContent> CreateAsync(
);

/// <summary>
/// Deletes a scim token by its connection <c>id</c> and <c>tokenId</c>.
/// Deletes a scim token by its connection `id` and `tokenId`.
/// </summary>
Task DeleteAsync(
string id,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ private async Task<WithRawResponse<CreateScimTokenResponseContent>> CreateAsyncC
}

/// <summary>
/// Retrieves all scim tokens by its connection <c>id</c>.
/// Retrieves all scim tokens by its connection `id`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.Tokens.GetAsync("id");
Expand Down Expand Up @@ -223,7 +223,7 @@ public WithRawResponseTask<CreateScimTokenResponseContent> CreateAsync(
}

/// <summary>
/// Deletes a scim token by its connection <c>id</c> and <c>tokenId</c>.
/// Deletes a scim token by its connection `id` and `tokenId`.
/// </summary>
/// <example><code>
/// await client.Connections.ScimConfiguration.Tokens.DeleteAsync("id", "tokenId");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ private async Task<WithRawResponse<CreateEventStreamResponseContent>> CreateAsyn
Path = "event-streams",
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,6 @@ private async Task<WithRawResponse<CreateFlowsVaultConnectionResponseContent>> C
Path = "flows/vault/connections",
Body = request,
Headers = _headers,
ContentType = "application/json",
Options = options,
},
cancellationToken
Expand Down
3 changes: 3 additions & 0 deletions src/Auth0.ManagementApi/Groups/GroupsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ internal GroupsClient(RawClient client)
{
_client = client;
Members = new Auth0.ManagementApi.Groups.MembersClient(_client);
Roles = new Auth0.ManagementApi.Groups.RolesClient(_client);
}

public Auth0.ManagementApi.Groups.IMembersClient Members { get; }

public Auth0.ManagementApi.Groups.IRolesClient Roles { get; }

/// <summary>
/// List all groups in your tenant.
/// </summary>
Expand Down
1 change: 1 addition & 0 deletions src/Auth0.ManagementApi/Groups/IGroupsClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ namespace Auth0.ManagementApi;
public partial interface IGroupsClient
{
public Auth0.ManagementApi.Groups.IMembersClient Members { get; }
public Auth0.ManagementApi.Groups.IRolesClient Roles { get; }

/// <summary>
/// List all groups in your tenant.
Expand Down
37 changes: 37 additions & 0 deletions src/Auth0.ManagementApi/Groups/Roles/IRolesClient.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
using Auth0.ManagementApi;
using Auth0.ManagementApi.Core;

namespace Auth0.ManagementApi.Groups;

public partial interface IRolesClient
{
/// <summary>
/// Lists the <see href="https://auth0.com/docs/manage-users/access-control/rbac">roles</see> assigned to a group.
/// </summary>
Task<Pager<Role>> ListAsync(
string id,
ListGroupRolesRequestParameters request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
);

/// <summary>
/// Assign one or more <see href="https://auth0.com/docs/manage-users/access-control/rbac">roles</see> to a specified group.
/// </summary>
Task CreateAsync(
string id,
CreateGroupRolesRequestParameters request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
);

/// <summary>
/// Unassign one or more <see href="https://auth0.com/docs/manage-users/access-control/rbac">roles</see> from a specified group.
/// </summary>
Task DeleteAsync(
string id,
DeleteGroupRolesRequestContent request,
RequestOptions? options = null,
CancellationToken cancellationToken = default
);
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Auth0.ManagementApi.Core;
using global::System.Text.Json.Serialization;

namespace Auth0.ManagementApi.Groups;

[Serializable]
public record CreateGroupRolesRequestParameters
{
/// <summary>
/// Array of role IDs to assign to the group.
/// </summary>
[JsonPropertyName("roles")]
public IEnumerable<string> Roles { get; set; } = new List<string>();

/// <inheritdoc />
public override string ToString()
{
return JsonUtils.Serialize(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Auth0.ManagementApi.Core;
using global::System.Text.Json.Serialization;

namespace Auth0.ManagementApi.Groups;

[Serializable]
public record DeleteGroupRolesRequestContent
{
/// <summary>
/// Array of role IDs to remove from the group.
/// </summary>
[JsonPropertyName("roles")]
public IEnumerable<string> Roles { get; set; } = new List<string>();

/// <inheritdoc />
public override string ToString()
{
return JsonUtils.Serialize(this);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using Auth0.ManagementApi.Core;
using global::System.Text.Json.Serialization;

namespace Auth0.ManagementApi.Groups;

[Serializable]
public record ListGroupRolesRequestParameters
{
/// <summary>
/// Optional Id from which to start selection.
/// </summary>
[JsonIgnore]
public Optional<string?> From { get; set; }

/// <summary>
/// Number of results per page. Defaults to 50.
/// </summary>
[JsonIgnore]
public Optional<int?> Take { get; set; } = 50;

/// <inheritdoc />
public override string ToString()
{
return JsonUtils.Serialize(this);
}
}
Loading
Loading