workos / workos-dotnet

Official .NET SDK for interacting with the WorkOS API
MIT License
9 stars 9 forks source link

Newtonsoft.Json.JsonSerializationException: 'Error converting value "validating" to type 'WorkOS.DirectoryState'. #173

Closed WillyPain closed 2 months ago

WillyPain commented 2 months ago

Looks like the .net sdk is missing a few states in the DirectoryState enum

From workos-dotnet

    public enum DirectoryState
    {
        [EnumMember(Value = "linked")]
        Active,

        [EnumMember(Value = "unlinked")]
        Inactive,

        [EnumMember(Value = "invalid_credentials")]
        InvalidCredentials,
    }

From workos-node

 export type DirectoryState =
  | 'active'
  | 'deleting'
  | 'inactive'
  | 'invalid_credentials'
  | 'validating';
PaulAsjes commented 2 months ago

Fixed in https://github.com/workos/workos-dotnet/pull/174, thanks again!