Skip to content
Open
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
2 changes: 1 addition & 1 deletion .last-synced-sha
Original file line number Diff line number Diff line change
@@ -1 +1 @@
92db0495807c86fbbc4d45bd266a6c1f5bcbb59c
ff939ff075453287993e1e6182f1d6f23c67ab80
69 changes: 52 additions & 17 deletions .oagen-manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"version": 2,
"language": "dotnet",
"generatedAt": "2026-04-28T16:33:51.142Z",
"generatedAt": "2026-05-03T22:58:09.919Z",
"files": [
"src/WorkOS.net/Client/Utilities/EventSchemaDiscriminatorConverter.cs",
"src/WorkOS.net/Client/WorkOSClient.Generated.cs",
Expand All @@ -16,7 +16,6 @@
"src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs",
"src/WorkOS.net/Entities/ApiKeyRevoked.cs",
"src/WorkOS.net/Entities/ApiKeyValidationResponse.cs",
"src/WorkOS.net/Entities/ApiKeyWithValue.cs",
"src/WorkOS.net/Entities/ApplicationCredentialsListItem.cs",
"src/WorkOS.net/Entities/AssignRole.cs",
"src/WorkOS.net/Entities/AuditLogActionJson.cs",
Expand Down Expand Up @@ -124,6 +123,7 @@
"src/WorkOS.net/Entities/CreatePasswordResetToken.cs",
"src/WorkOS.net/Entities/CreateRedirectUri.cs",
"src/WorkOS.net/Entities/CreateUser.cs",
"src/WorkOS.net/Entities/CreateUserApiKey.cs",
"src/WorkOS.net/Entities/CreateUserInviteOptions.cs",
"src/WorkOS.net/Entities/CreateUserOrganizationMembership.cs",
"src/WorkOS.net/Entities/CreateWebhookEndpoint.cs",
Expand Down Expand Up @@ -218,6 +218,8 @@
"src/WorkOS.net/Entities/MfaTotpSessionAuthenticateRequest.cs",
"src/WorkOS.net/Entities/NewConnectApplicationSecret.cs",
"src/WorkOS.net/Entities/Organization.cs",
"src/WorkOS.net/Entities/OrganizationApiKey.cs",
"src/WorkOS.net/Entities/OrganizationApiKeyWithValue.cs",
"src/WorkOS.net/Entities/OrganizationCreated.cs",
"src/WorkOS.net/Entities/OrganizationCreatedData.cs",
"src/WorkOS.net/Entities/OrganizationCreatedDataDomain.cs",
Expand Down Expand Up @@ -293,6 +295,9 @@
"src/WorkOS.net/Entities/UpdateUserOrganizationMembership.cs",
"src/WorkOS.net/Entities/UpdateWebhookEndpoint.cs",
"src/WorkOS.net/Entities/User.cs",
"src/WorkOS.net/Entities/UserApiKey.cs",
"src/WorkOS.net/Entities/UserApiKeyOwner.cs",
"src/WorkOS.net/Entities/UserApiKeyWithValue.cs",
"src/WorkOS.net/Entities/UserAuthenticationFactorEnrollResponse.cs",
"src/WorkOS.net/Entities/UserConsentOption.cs",
"src/WorkOS.net/Entities/UserConsentOptionChoice.cs",
Expand All @@ -304,6 +309,8 @@
"src/WorkOS.net/Entities/UserOrganizationMembershipBaseListData.cs",
"src/WorkOS.net/Entities/UserUpdated.cs",
"src/WorkOS.net/Entities/ValidateApiKey.cs",
"src/WorkOS.net/Entities/VaultByokKeyDeleted.cs",
"src/WorkOS.net/Entities/VaultByokKeyDeletedData.cs",
"src/WorkOS.net/Entities/VaultByokKeyVerificationCompleted.cs",
"src/WorkOS.net/Entities/VaultByokKeyVerificationCompletedData.cs",
"src/WorkOS.net/Entities/VaultDataCreated.cs",
Expand All @@ -329,7 +336,7 @@
"src/WorkOS.net/Entities/WebhookEndpointJson.cs",
"src/WorkOS.net/Entities/WidgetSessionToken.cs",
"src/WorkOS.net/Entities/WidgetSessionTokenResponse.cs",
"src/WorkOS.net/Enums/ApplicationsOrder.cs",
"src/WorkOS.net/Enums/ApiKeysOrder.cs",
"src/WorkOS.net/Enums/AuditLogConfigurationLogStreamState.cs",
"src/WorkOS.net/Enums/AuditLogConfigurationLogStreamType.cs",
"src/WorkOS.net/Enums/AuditLogConfigurationState.cs",
Expand Down Expand Up @@ -380,7 +387,7 @@
"src/WorkOS.net/Enums/UserIdentitiesGetItemProvider.cs",
"src/WorkOS.net/Enums/UserManagementAuthenticationProvider.cs",
"src/WorkOS.net/Enums/UserManagementAuthenticationScreenHint.cs",
"src/WorkOS.net/Enums/VaultByokKeyVerificationCompletedDataKeyProvider.cs",
"src/WorkOS.net/Enums/VaultByokKeyDeletedDataKeyProvider.cs",
"src/WorkOS.net/Enums/VaultDataCreatedDataActorSource.cs",
"src/WorkOS.net/Enums/WaitlistUserState.cs",
"src/WorkOS.net/Enums/WidgetSessionTokenScopes.cs",
Expand Down Expand Up @@ -467,9 +474,6 @@
"test/WorkOSTests/testdata/api_key_revoked_nulls.json",
"test/WorkOSTests/testdata/api_key_validation_response.json",
"test/WorkOSTests/testdata/api_key_validation_response_nulls.json",
"test/WorkOSTests/testdata/api_key_with_value.json",
"test/WorkOSTests/testdata/api_key_with_value_nulls.json",
"test/WorkOSTests/testdata/api_key_with_value_owner.json",
"test/WorkOSTests/testdata/application_credentials_list_item.json",
"test/WorkOSTests/testdata/application_credentials_list_item_nulls.json",
"test/WorkOSTests/testdata/assign_role.json",
Expand Down Expand Up @@ -684,6 +688,8 @@
"test/WorkOSTests/testdata/create_role.json",
"test/WorkOSTests/testdata/create_role_nulls.json",
"test/WorkOSTests/testdata/create_user.json",
"test/WorkOSTests/testdata/create_user_api_key.json",
"test/WorkOSTests/testdata/create_user_api_key_nulls.json",
"test/WorkOSTests/testdata/create_user_invite_options.json",
"test/WorkOSTests/testdata/create_user_invite_options_nulls.json",
"test/WorkOSTests/testdata/create_user_nulls.json",
Expand Down Expand Up @@ -881,7 +887,6 @@
"test/WorkOSTests/testdata/jwks_response.json",
"test/WorkOSTests/testdata/jwks_response_keys.json",
"test/WorkOSTests/testdata/jwt_template_response.json",
"test/WorkOSTests/testdata/list_api_key.json",
"test/WorkOSTests/testdata/list_audit_log_action_json.json",
"test/WorkOSTests/testdata/list_audit_log_schema_json.json",
"test/WorkOSTests/testdata/list_authentication_factor.json",
Expand All @@ -893,7 +898,6 @@
"test/WorkOSTests/testdata/list_directory.json",
"test/WorkOSTests/testdata/list_directory_group.json",
"test/WorkOSTests/testdata/list_directory_user_with_groups.json",
"test/WorkOSTests/testdata/list_empty_api_key.json",
"test/WorkOSTests/testdata/list_empty_audit_log_action_json.json",
"test/WorkOSTests/testdata/list_empty_audit_log_schema_json.json",
"test/WorkOSTests/testdata/list_empty_authentication_factor.json",
Expand All @@ -909,8 +913,10 @@
"test/WorkOSTests/testdata/list_empty_flag.json",
"test/WorkOSTests/testdata/list_empty_group.json",
"test/WorkOSTests/testdata/list_empty_organization.json",
"test/WorkOSTests/testdata/list_empty_organization_api_key.json",
"test/WorkOSTests/testdata/list_empty_role_assignment.json",
"test/WorkOSTests/testdata/list_empty_user.json",
"test/WorkOSTests/testdata/list_empty_user_api_key.json",
"test/WorkOSTests/testdata/list_empty_user_invite.json",
"test/WorkOSTests/testdata/list_empty_user_organization_membership.json",
"test/WorkOSTests/testdata/list_empty_user_organization_membership_base_list_data.json",
Expand All @@ -920,8 +926,10 @@
"test/WorkOSTests/testdata/list_flag.json",
"test/WorkOSTests/testdata/list_group.json",
"test/WorkOSTests/testdata/list_organization.json",
"test/WorkOSTests/testdata/list_organization_api_key.json",
"test/WorkOSTests/testdata/list_role_assignment.json",
"test/WorkOSTests/testdata/list_user.json",
"test/WorkOSTests/testdata/list_user_api_key.json",
"test/WorkOSTests/testdata/list_user_invite.json",
"test/WorkOSTests/testdata/list_user_organization_membership.json",
"test/WorkOSTests/testdata/list_user_organization_membership_base_list_data.json",
Expand All @@ -938,6 +946,12 @@
"test/WorkOSTests/testdata/new_connect_application_secret.json",
"test/WorkOSTests/testdata/new_connect_application_secret_nulls.json",
"test/WorkOSTests/testdata/organization.json",
"test/WorkOSTests/testdata/organization_api_key.json",
"test/WorkOSTests/testdata/organization_api_key_nulls.json",
"test/WorkOSTests/testdata/organization_api_key_owner.json",
"test/WorkOSTests/testdata/organization_api_key_with_value.json",
"test/WorkOSTests/testdata/organization_api_key_with_value_nulls.json",
"test/WorkOSTests/testdata/organization_api_key_with_value_owner.json",
"test/WorkOSTests/testdata/organization_created.json",
"test/WorkOSTests/testdata/organization_created_data.json",
"test/WorkOSTests/testdata/organization_created_data_domain.json",
Expand Down Expand Up @@ -1126,6 +1140,12 @@
"test/WorkOSTests/testdata/update_webhook_endpoint.json",
"test/WorkOSTests/testdata/update_webhook_endpoint_nulls.json",
"test/WorkOSTests/testdata/user.json",
"test/WorkOSTests/testdata/user_api_key.json",
"test/WorkOSTests/testdata/user_api_key_nulls.json",
"test/WorkOSTests/testdata/user_api_key_owner.json",
"test/WorkOSTests/testdata/user_api_key_with_value.json",
"test/WorkOSTests/testdata/user_api_key_with_value_nulls.json",
"test/WorkOSTests/testdata/user_api_key_with_value_owner.json",
"test/WorkOSTests/testdata/user_authentication_factor_enroll_response.json",
"test/WorkOSTests/testdata/user_consent_option.json",
"test/WorkOSTests/testdata/user_consent_option_choice.json",
Expand Down Expand Up @@ -1153,6 +1173,9 @@
"test/WorkOSTests/testdata/user_updated.json",
"test/WorkOSTests/testdata/user_updated_nulls.json",
"test/WorkOSTests/testdata/validate_api_key.json",
"test/WorkOSTests/testdata/vault_byok_key_deleted.json",
"test/WorkOSTests/testdata/vault_byok_key_deleted_data.json",
"test/WorkOSTests/testdata/vault_byok_key_deleted_nulls.json",
"test/WorkOSTests/testdata/vault_byok_key_verification_completed.json",
"test/WorkOSTests/testdata/vault_byok_key_verification_completed_data.json",
"test/WorkOSTests/testdata/vault_byok_key_verification_completed_nulls.json",
Expand Down Expand Up @@ -1199,14 +1222,6 @@
"test/WorkOSTests/testdata/widget_session_token_response.json"
],
"operations": {
"POST /api_keys/validations": {
"sdkMethod": "CreateValidationAsync",
"service": "api_keys"
},
"DELETE /api_keys/{id}": {
"sdkMethod": "DeleteAsync",
"service": "api_keys"
},
"POST /auth/challenges/{id}/verify": {
"sdkMethod": "VerifyChallengeAsync",
"service": "multi_factor_auth"
Expand Down Expand Up @@ -1743,6 +1758,10 @@
"sdkMethod": "RevokeInvitationAsync",
"service": "user_management"
},
"GET /user_management/jwt_template": {
"sdkMethod": "ListJWTTemplateAsync",
"service": "user_management"
},
"PUT /user_management/jwt_template": {
"sdkMethod": "UpdateJWTTemplateAsync",
"service": "user_management"
Expand Down Expand Up @@ -1843,6 +1862,22 @@
"sdkMethod": "CreateTokenAsync",
"service": "widgets"
},
"POST /api_keys/validations": {
"sdkMethod": "CreateValidationAsync",
"service": "api_keys"
},
"DELETE /api_keys/{id}": {
"sdkMethod": "DeleteAsync",
"service": "api_keys"
},
"GET /user_management/users/{userId}/api_keys": {
"sdkMethod": "ListApiKeysAsync",
"service": "user_management"
},
"POST /user_management/users/{userId}/api_keys": {
"sdkMethod": "CreateApiKeyAsync",
"service": "user_management"
},
"GET /audit_logs/actions": {
"sdkMethod": "ListActionsAsync",
"service": "audit_logs"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ public override object ReadJson(Newtonsoft.Json.JsonReader reader, Type objectTy
case "user.created": target = new UserCreated(); break;
case "user.deleted": target = new UserDeleted(); break;
case "user.updated": target = new UserUpdated(); break;
case "vault.byok_key.deleted": target = new VaultByokKeyDeleted(); break;
case "vault.byok_key.verification_completed": target = new VaultByokKeyVerificationCompleted(); break;
case "vault.data.created": target = new VaultDataCreated(); break;
case "vault.data.deleted": target = new VaultDataDeleted(); break;
Expand Down
10 changes: 5 additions & 5 deletions src/WorkOS.net/Client/WorkOSClient.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@ namespace WorkOS
/// </summary>
public partial class WorkOSClient
{
private ApiKeysService apiKeys;

/// <summary>Gets the <see cref="ApiKeysService"/> for api keys API operations.</summary>
public virtual ApiKeysService ApiKeys => this.apiKeys ??= new ApiKeysService(this);

private MultiFactorAuthService multiFactorAuth;

/// <summary>Gets the <see cref="MultiFactorAuthService"/> for multi factor auth API operations.</summary>
Expand Down Expand Up @@ -62,6 +57,11 @@ public partial class WorkOSClient
/// <summary>Gets the <see cref="OrganizationsService"/> for organizations API operations.</summary>
public virtual OrganizationsService Organizations => this.organizations ??= new OrganizationsService(this);

private ApiKeysService apiKeys;

/// <summary>Gets the <see cref="ApiKeysService"/> for api keys API operations.</summary>
public virtual ApiKeysService ApiKeys => this.apiKeys ??= new ApiKeysService(this);

private GroupsService groups;

/// <summary>Gets the <see cref="GroupsService"/> for groups API operations.</summary>
Expand Down
2 changes: 1 addition & 1 deletion src/WorkOS.net/Entities/ApiKey.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace WorkOS
using System;
using System.Collections.Generic;

/// <summary>The API Key object if the value is valid, or `null` if invalid.</summary>
/// <summary>Represents an api key.</summary>
public class ApiKey
{

Expand Down
2 changes: 1 addition & 1 deletion src/WorkOS.net/Entities/ApiKeyCreatedDataOwner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace WorkOS
{

/// <summary>The owner of the API key.</summary>
/// <summary>Represents an api key created data owner.</summary>
public class ApiKeyCreatedDataOwner
{

Expand Down
20 changes: 20 additions & 0 deletions src/WorkOS.net/Entities/CreateUserApiKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
// This file is auto-generated by oagen. Do not edit.

namespace WorkOS
{
using System.Collections.Generic;

/// <summary>Represents a create user api key.</summary>
public class CreateUserApiKey
{

/// <summary>A descriptive name for the API key.</summary>
public string Name { get; set; } = default!;

/// <summary>The ID of the organization the user API key is associated with. The user must have an active membership in this organization.</summary>
public string OrganizationId { get; set; } = default!;

/// <summary>The permission slugs to assign to the API key. Each permission must be enabled for user API keys.</summary>
public List<string>? Permissions { get; set; }
}
}
Comment on lines +1 to +20
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 CreateUserApiKey entity is unreferenced dead code

This class is not used anywhere in service or client code — UserManagementService.CreateApiKeyAsync accepts UserManagementCreateApiKeyOptions (which carries the same three fields: Name, OrganizationId, Permissions). CreateUserApiKey only appears in the generated manifest. Shipping a public class that mirrors a request-options class adds API-surface noise and may confuse consumers about which type to use when creating user API keys.

3 changes: 3 additions & 0 deletions src/WorkOS.net/Entities/DirectoryUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class DirectoryUser
/// <summary>The last name of the user.</summary>
public string? LastName { get; set; }

/// <summary>The full name of the user.</summary>
public string? Name { get; set; }

/// <summary>A list of email addresses for the user.</summary>
[System.Obsolete("This field is deprecated.")]
public List<DirectoryUserEmail>? Emails { get; set; }
Expand Down
7 changes: 5 additions & 2 deletions src/WorkOS.net/Entities/DirectoryUserWithGroups.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class DirectoryUserWithGroups
/// <summary>The last name of the user.</summary>
public string? LastName { get; set; }

/// <summary>The full name of the user.</summary>
public string? Name { get; set; }

/// <summary>A list of email addresses for the user.</summary>
[System.Obsolete("This field is deprecated.")]
public List<DirectoryUserEmail>? Emails { get; set; }
Expand Down Expand Up @@ -69,8 +72,8 @@ public class DirectoryUserWithGroups
/// <summary>An ISO 8601 timestamp.</summary>
public DateTimeOffset UpdatedAt { get; set; }

/// <summary>The directory groups the user belongs to. Use the List Directory Groups endpoint with a user filter instead.</summary>
[System.Obsolete("This field is deprecated.")]
/// <summary>The directory groups the user belongs to. Deprecated: starting May 1, 2026, this field returns an empty array by default for newly created teams. Existing teams currently depending on this field should migrate to the new access pattern for better throughput performance — the field is unbounded by user, so users with many group memberships produce large, slow response payloads. Use the List Directory Groups endpoint with a `user` filter to fetch a user's group memberships.</summary>
[System.Obsolete("Deprecated. starting May 1, 2026, this field returns an empty array by default for newly created teams.")]
public List<DirectoryGroup> Groups { get; set; } = default!;

/// <summary>
Expand Down
3 changes: 3 additions & 0 deletions src/WorkOS.net/Entities/DsyncUserUpdatedData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ public class DsyncUserUpdatedData
/// <summary>The last name of the user.</summary>
public string? LastName { get; set; }

/// <summary>The full name of the user.</summary>
public string? Name { get; set; }

/// <summary>A list of email addresses for the user.</summary>
[System.Obsolete("This field is deprecated.")]
public List<DirectoryUserEmail>? Emails { get; set; }
Expand Down
39 changes: 39 additions & 0 deletions src/WorkOS.net/Entities/OrganizationApiKey.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// This file is auto-generated by oagen. Do not edit.

namespace WorkOS
{
using System;
using System.Collections.Generic;

/// <summary>Represents an organization api key.</summary>
public class OrganizationApiKey
{

/// <summary>Distinguishes the API Key object.</summary>
public string Object { get; internal set; } = "api_key";

/// <summary>Unique identifier of the API Key.</summary>
public string Id { get; set; } = default!;

/// <summary>The entity that owns the API Key.</summary>
public ApiKeyCreatedDataOwner Owner { get; set; } = default!;

/// <summary>A descriptive name for the API Key.</summary>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Owner typed as ApiKeyCreatedDataOwner instead of a dedicated org-owner type

OrganizationApiKey.Owner (and OrganizationApiKeyWithValue.Owner) is typed as ApiKeyCreatedDataOwner — a class originally scoped to event-data contexts. The PR description mentions adding OrganizationApiKeyOwner, but that class was never generated. While the JSON structure is currently identical (type, id), reusing the event-data owner type couples two separate API surfaces. If the org-owner shape diverges in a future spec change, it would require a breaking rename here.

public string Name { get; set; } = default!;

/// <summary>An obfuscated representation of the API Key value.</summary>
public string ObfuscatedValue { get; set; } = default!;

/// <summary>Timestamp of when the API Key was last used.</summary>
public DateTimeOffset? LastUsedAt { get; set; }

/// <summary>The permission slugs assigned to the API Key.</summary>
public List<string> Permissions { get; set; } = default!;

/// <summary>An ISO 8601 timestamp.</summary>
public DateTimeOffset CreatedAt { get; set; }

/// <summary>An ISO 8601 timestamp.</summary>
public DateTimeOffset UpdatedAt { get; set; }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ namespace WorkOS
using System;
using System.Collections.Generic;

/// <summary>Represents an api key with value.</summary>
public class ApiKeyWithValue
/// <summary>Represents an organization api key with value.</summary>
public class OrganizationApiKeyWithValue
{

/// <summary>Distinguishes the API Key object.</summary>
Expand Down
3 changes: 3 additions & 0 deletions src/WorkOS.net/Entities/OrganizationMembership.cs
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ public class OrganizationMembership
/// <summary>The primary role assigned to the user within the organization.</summary>
public AddRolePermission Role { get; set; } = default!;

/// <summary>The user that belongs to the organization through this membership.</summary>
public User User { get; set; } = default!;

/// <summary>
/// Typed accessor for <see cref="CustomAttributes"/>. Returns the value stored under
/// <paramref name="key"/> coerced to <typeparamref name="T"/>, or the default
Expand Down
3 changes: 3 additions & 0 deletions src/WorkOS.net/Entities/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ public class Profile
/// <summary>The user's last name.</summary>
public string? LastName { get; set; }

/// <summary>The user's full name.</summary>
public string? Name { get; set; }

/// <summary>The role assigned to the user within the organization, if applicable.</summary>
public AddRolePermission? Role { get; set; }

Expand Down
Loading
Loading